Skip to content

Commit

Permalink
chore: upgrade to Go 1.16 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakovlenko authored Mar 1, 2021
1 parent 5538245 commit 6b8e240
Show file tree
Hide file tree
Showing 8 changed files with 198 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
go-version: 1.16.x
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
go-version: 1.16.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module zit

go 1.14
go 1.16

require (
github.com/google/go-jsonnet v0.15.0
github.com/spf13/cobra v0.0.7
github.com/spf13/pflag v1.0.5 // indirect
github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0
github.com/google/go-jsonnet v0.17.0
github.com/spf13/cobra v1.1.3
github.com/whilp/git-urls v1.0.0
)
219 changes: 180 additions & 39 deletions go.sum

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
13 changes: 11 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ package version

import (
"fmt"
"strings"

"github.com/spf13/cobra"

_ "embed" // embed
)

const version = "v2.2.0"
//go:embed version.txt
var version string

// Tag returns application version tag.
func Tag() string {
return strings.TrimSpace(version)
}

// VersionCmd is a command that prints the app version.
var VersionCmd = &cobra.Command{
Use: "version",
Short: "Print version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
fmt.Println(Tag())
},
}
1 change: 1 addition & 0 deletions version/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.2.0+1

0 comments on commit 6b8e240

Please sign in to comment.