aboutsummaryrefslogtreecommitdiff
path: root/cmd/planr/sub/common.go
blob: 7e896c14ca6796f8b1fb486b739d591b2bc7db53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package sub

import (
  "golang.furkistan.com/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)
  }
}