Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use Go 1.18 (#157)
* Use Go 1.18

/cherry-pick

Signed-off-by: 1gtm <1gtm@appscode.com>

* Replace strings.Title to cases.Title

Signed-off-by: Tamal Saha <tamal@appscode.com>

Co-authored-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
1gtm and tamalsaha committed Mar 17, 2022
1 parent 8399b7e commit bd6a3a1
Show file tree
Hide file tree
Showing 45 changed files with 23,068 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -13,10 +13,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.18
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-docs.yml
Expand Up @@ -10,10 +10,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.18
id: go

- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -53,7 +53,7 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) windows/amd64 darwin/amd64 darwin/arm64
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

GO_VERSION ?= 1.17
GO_VERSION ?= 1.18
BUILD_IMAGE ?= appscode/golang-dev:$(GO_VERSION)

RESTIC_VER := 0.12.1
Expand Down
1 change: 1 addition & 0 deletions go.mod
Expand Up @@ -8,6 +8,7 @@ require (
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.1.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.2.1
golang.org/x/text v0.3.7
gomodules.xyz/go-sh v0.1.0
gomodules.xyz/logs v0.0.6
gomodules.xyz/pointer v0.1.0
Expand Down
4 changes: 3 additions & 1 deletion hack/gendocs/main.go
Expand Up @@ -28,6 +28,8 @@ import (
"stash.appscode.dev/cli/pkg"

"github.com/spf13/cobra/doc"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"gomodules.xyz/runtime"
"k8s.io/klog/v2"
)
Expand Down Expand Up @@ -91,7 +93,7 @@ func main() {
filePrepender := func(filename string) string {
filename = filepath.Base(filename)
base := strings.TrimSuffix(filename, path.Ext(filename))
name := strings.Title(strings.Replace(base, "_", " ", -1))
name := cases.Title(language.English).String(strings.Replace(base, "_", " ", -1))
parts := strings.Split(name, " ")
if len(parts) > 1 {
name = strings.Join(parts[1:], " ")
Expand Down
162 changes: 162 additions & 0 deletions vendor/golang.org/x/text/cases/cases.go

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

0 comments on commit bd6a3a1

Please sign in to comment.