aboutsummaryrefslogtreecommitdiff
path: root/cmd/planr/sub/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/planr/sub/common.go')
-rw-r--r--cmd/planr/sub/common.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/planr/sub/common.go b/cmd/planr/sub/common.go
new file mode 100644
index 0000000..67d07f8
--- /dev/null
+++ b/cmd/planr/sub/common.go
@@ -0,0 +1,15 @@
+package sub
+
+import (
+ "golang.flu0r1ne.net/planr"
+ "os"
+ "fmt"
+)
+
+func dieIncompatibleVersion(cfg planr.Config) {
+ if cfg.IncompatibleWithVersion() {
+ fmt.Fprintf(os.Stderr, "This version of PlanR (%v) is incompatible with config version %s\n", planr.VERSION, cfg.Version)
+ fmt.Fprintf(os.Stderr, "Please upgrade to version %s or greater\n", cfg.Version)
+ os.Exit(1)
+ }
+}