Skip to content

update Go version to 1.17#2366

Open
alexandear wants to merge 1 commit intospf13:mainfrom
alexandear-org:chore/go-117
Open

update Go version to 1.17#2366
alexandear wants to merge 1 commit intospf13:mainfrom
alexandear-org:chore/go-117

Conversation

@alexandear
Copy link

I think it's time to update to Go 1.17. See comments in #1871.

Currently, it's impossible to run tests with Go 1.15:

go1.15 version
go version go1.15 darwin/amd64go1.15 test ./...
# github.com/spf13/cobra/doc [github.com/spf13/cobra/doc.test]
doc/man_docs_test.go:167:17: undefined: os.MkdirTemp
doc/man_docs_test.go:218:15: undefined: os.CreateTemp
doc/md_docs_test.go:96:17: undefined: os.MkdirTemp
doc/md_docs_test.go:112:15: undefined: os.CreateTemp
doc/rest_docs_test.go:83:17: undefined: os.MkdirTemp
doc/rest_docs_test.go:99:15: undefined: os.CreateTemp
doc/yaml_docs_test.go:60:17: undefined: os.MkdirTemp
doc/yaml_docs_test.go:87:15: undefined: os.CreateTemp
# github.com/spf13/cobra [github.com/spf13/cobra.test]
./cobra_test.go:259:9: undefined: os.WriteFile
./command_test.go:2199:22: undefined: io.ReadAll
./command_test.go:2204:22: undefined: io.ReadAll
./fish_completions_test.go:102:18: undefined: os.CreateTemp
./fish_completions_test.go:121:17: undefined: os.MkdirTemp
FAIL    github.com/spf13/cobra [build failed]
FAIL    github.com/spf13/cobra/doc [build failed]
FAILgo1.17 test -count=1 ./...
ok      github.com/spf13/cobra  1.041s
ok      github.com/spf13/cobra/doc      0.325s
How to install go1.15

$ GOARCH=amd64 go run golang.org/dl/go1.15@latest download
$ go install golang.org/dl/go1.15@latest

@CLAassistant
Copy link

CLAassistant commented Mar 8, 2026

CLA assistant check
All committers have signed the CLA.

go.yaml.in/yaml/v3 v3.0.4
)

require github.com/russross/blackfriday/v2 v2.1.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised to see thus one popping here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an indirect dependency of github.com/cpuguy83/go-md2man/v2/md2man:

❯ go1.17 mod why -m github.com/russross/blackfriday/v2
# github.com/russross/blackfriday/v2
github.com/spf13/cobra/doc
github.com/cpuguy83/go-md2man/v2/md2man
github.com/russross/blackfriday/v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants