met issue with golang 1.18 standard package strings.Cut
See original GitHub issueDescription:
I used strings.Cut
in my project and our go.mod already updated to golang 1.18.2
and I update actions/setup-go
with go-version1.19, but there are some errors. Now I update them to golang 1.19
and still met these errors
Action version: actions/setup-go@v3 actions/checkout@v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ needs.filter_changes.outputs.ref }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '1.19.0'
- name: Checkout ENV go version
run: go version
# ==run unitest. I use ginkgo -v
- name: Run unitest
id: unitest
continue-on-error: true
run: |
sudo make unitest-tests
Log
coverage: [no statements]
Failed to compile cmd:
# github.com/spidernet-io/spiderpool/pkg/workloadendpointmanager
Error: ../../../pkg/workloadendpointmanager/workloadendpoint_manager.go:292:16: undefined: strings.Cut
Error: ../../../pkg/workloadendpointmanager/workloadendpoint_manager.go:336:25: undefined: strings.Cut
Error: ../../../pkg/workloadendpointmanager/workloadendpoint_manager.go:341:25: undefined: strings.Cut
note: module requires Go 1.19
composite coverage: 85.1% of statements
exit status 1
make: *** [Makefile:268: unitest-tests] Error 1
Ginkgo ran 4 suites in 1m15.916056532s
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Go 1.18: Cut added to strings/bytes - DEV Community
This article brings the Cut function added to strings and bytes package as a topic. The Cut function is described like this in...
Read more >Go 1.18 Release Notes - The Go Programming Language
Introduction to Go 1.18. The latest Go release, version 1.18, is a significant release, including changes to the language, implementation of the toolchain, ......
Read more >Commonlibs - Go Packages
package module ... A helper module using Golang 1.18 generics. ... func Md5(in string) string; func Reduce(input []T, initial K, f func(K, ...
Read more >Go Playground - The Go Programming Language
The only communication a playground program has to the outside world is by writing to standard output and standard error. In the playground...
Read more >Go 1.8 Release Notes - The Go Programming Language
Introduction to Go 1.8; Changes to the language; Ports: Known Issues ... into the standard library, Go 1.8 adds more context support to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @Icarus9913!
Have you already tried the workarounds suggested in this issue? Did they not work for you? Could you provide a workflow with errors?
Got it! Resolved! Thank you very much!