summaryrefslogtreecommitdiff
path: root/cmd/planr/sub/common.go
blob: 67d07f8147b2a5915c7bfa46600012091d92597c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
  }
}