diff --git a/cli/root.go b/cli/root.go index 0b8e59b..76f2904 100644 --- a/cli/root.go +++ b/cli/root.go @@ -14,19 +14,18 @@ import ( "git.cryptic.systems/volker.raschek/flucky/cli/sensor" "git.cryptic.systems/volker.raschek/flucky/cli/temperature" "git.cryptic.systems/volker.raschek/flucky/pkg/config" - "github.com/Masterminds/semver" uuid "github.com/satori/go.uuid" "github.com/spf13/cobra" ) // Execute a -func Execute(version *semver.Version) error { +func Execute(version string) error { rootCmd := &cobra.Command{ Use: "flucky", PersistentPreRunE: preRunError, - Version: version.String(), + Version: version, } defaultConfigFile, err := getDefaultConfigFile() diff --git a/go.mod b/go.mod index 4c9f86e..f9213f9 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( git.cryptic.systems/volker.raschek/dockerutils v0.2.0 git.cryptic.systems/volker.raschek/go-dht v0.1.2 git.cryptic.systems/volker.raschek/go-logger v0.1.0 - github.com/Masterminds/semver v1.5.0 github.com/d2r2/go-bsbmp v0.0.0-20190515110334-3b4b3aea8375 github.com/d2r2/go-i2c v0.0.0-20191123181816-73a8a799d6bc github.com/d2r2/go-logger v0.0.0-20181221090742-9998a510495e diff --git a/go.sum b/go.sum index 609b0ef..bc6d23b 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,6 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.3.12/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= diff --git a/main.go b/main.go index d149ca3..466287e 100644 --- a/main.go +++ b/main.go @@ -1,11 +1,7 @@ package main import ( - "log" - "os" - "git.cryptic.systems/volker.raschek/flucky/cli" - "github.com/Masterminds/semver" _ "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/database/sqlite3" @@ -18,11 +14,5 @@ var ( ) func main() { - sversion, err := semver.NewVersion(version) - if err != nil { - log.Printf("The sematic versioning is invalid: %v", version) - os.Exit(1) - } - - cli.Execute(sversion) + cli.Execute(version) }