fix: remove paring semver

This commit is contained in:
Markus Pesch 2021-04-10 17:02:43 +02:00
parent 4f2c03b0d5
commit f0d4c613ba
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
4 changed files with 3 additions and 17 deletions

View File

@ -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()

1
go.mod
View File

@ -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

2
go.sum
View File

@ -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=

12
main.go
View File

@ -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)
}