diff --git a/cmd/root.go b/cmd/root.go index a767aca..8f63f41 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -138,7 +138,7 @@ func init() { rootCmd.Flags().IntSliceVarP(&config.PrimaryKeyPositions, "primary-key", "p", []int{0}, "Primary key positions of the Input CSV as comma separated values Eg: 1,2") rootCmd.Flags().IntSliceVarP(&config.ValueColumnPositions, "columns", "", []int{}, "Selectively compare positions in CSV Eg: 1,2. Default is entire row") rootCmd.Flags().IntSliceVarP(&config.IncludeColumnPositions, "include", "", []int{}, "Include positions in CSV to display Eg: 1,2. Default is entire row") - rootCmd.Flags().StringVarP(&config.Format, "format", "o", "rowmark", fmt.Sprintf("Available (%s)", strings.Join(allFormats, "|"))) + rootCmd.Flags().StringVarP(&config.Format, "format", "o", "diff", fmt.Sprintf("Available (%s)", strings.Join(allFormats, "|"))) rootCmd.Flags().BoolVarP(&timed, "time", "", false, "Measure time") } diff --git a/cmd/version.go b/cmd/version.go index 532bb40..97fda97 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,15 +1,5 @@ package cmd -import ( - "fmt" - "os" - - "github.com/blang/semver" -) - -// VersionString to display on --version call -const VersionString = "csvdiff v1.0.0" - const defaultVersion = "1.0-dev" var version = defaultVersion @@ -21,19 +11,6 @@ func SetVersion(_version string) { return } - v, err := semver.Make(_version) - if err != nil { - fmt.Fprintf(os.Stderr, "built with wrong version tag\n") - version = defaultVersion - return - } - - if err = v.Validate(); err != nil { - fmt.Fprintf(os.Stderr, "built with wrong version tag\n") - version = defaultVersion - return - } - version = _version } diff --git a/go.mod b/go.mod index 15c8c40..339ffbd 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,6 @@ module github.com/aswinkarthik/csvdiff require ( github.com/OneOfOne/xxhash v1.2.2 // indirect - github.com/blang/semver v3.5.1+incompatible github.com/cespare/xxhash v1.0.0 github.com/davecgh/go-spew v1.1.0 // indirect github.com/fatih/color v1.7.0 diff --git a/go.sum b/go.sum index 1b8fe1e..4a50e50 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/cespare/xxhash v1.0.0 h1:naDmySfoNg0nKS62/ujM6e71ZgM2AoVdaqGwMG0w18A= github.com/cespare/xxhash v1.0.0/go.mod h1:fX/lfQBkSCDXZSUgv6jVIu/EVA3/JNseAX5asI4c4T4= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=