Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go version #255

Merged
merged 2 commits into from
Oct 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 6 additions & 11 deletions cmd/aws-iam-authenticator/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,30 @@ package main
import (
"fmt"

goVersion "github.com/christopherhein/go-version"
"github.com/spf13/cobra"
goVersion "go.hein.dev/go-version"
)

var (
shortened = false
version = "unversioned"
commit = ""
date = ""
output = ""
versionCmd = &cobra.Command{
Use: "version",
Short: "Version will output the current build information",
Long: ``,
Run: func(_ *cobra.Command, _ []string) {
var response string
versionOutput := goVersion.New(version, commit, date)

if shortened {
response = versionOutput.ToShortened()
} else {
response = versionOutput.ToJSON()
}
fmt.Printf("%+v", response)
resp := goVersion.FuncWithOutput(shortened, version, commit, date, output)
fmt.Print(resp)
return
},
}
)

func init() {
versionCmd.Flags().BoolVarP(&shortened, "short", "s", false, "Use shortened output for version information.")
versionCmd.Flags().BoolVarP(&shortened, "short", "s", false, "Print just the version number.")
versionCmd.Flags().StringVarP(&output, "output", "o", "json", "Output format. One of 'yaml' or 'json'.")
rootCmd.AddCommand(versionCmd)
}
28 changes: 17 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ go 1.12

require (
github.com/aws/aws-sdk-go v1.23.11
github.com/christopherhein/go-version v0.0.0-20180807222509-fee8dd1f7c24
github.com/gofrs/flock v0.7.0
github.com/hashicorp/hcl v0.0.0-20171009174708-42e33e2d55a0 // indirect
github.com/magiconair/properties v1.7.3 // indirect
github.com/pelletier/go-toml v1.0.1 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/sirupsen/logrus v1.2.0
github.com/spf13/afero v0.0.0-20171008182726-e67d870304c4 // indirect
github.com/spf13/cast v1.1.0 // indirect
github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937
github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386 // indirect
github.com/spf13/viper v1.0.0
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.4.0
go.hein.dev/go-version v0.1.0
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 // indirect
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect
golang.org/x/tools v0.0.0-20190814235402-ea4142463bf3 // indirect
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20190425012535-181e1f9c52c1
k8s.io/apiextensions-apiserver v0.0.0-20190426053235-842c4571cde0
Expand Down
243 changes: 227 additions & 16 deletions go.sum

Large diffs are not rendered by default.

56 changes: 0 additions & 56 deletions vendor/github.com/christopherhein/go-version/version.go

This file was deleted.

1 change: 1 addition & 0 deletions vendor/github.com/gogo/protobuf/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions vendor/github.com/gogo/protobuf/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/gogo/protobuf/proto/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 35 additions & 11 deletions vendor/github.com/gogo/protobuf/proto/clone.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions vendor/github.com/gogo/protobuf/proto/custom_gogo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading