We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
Playground go1.16.5
go env
Playground whatever.
Playground link
package main import ( "fmt" "strings" "runtime" ) func main() { println(runtime.Version()) ss := []string{ `Core.go`, `DebugInfo.go`, `Verifier.go` } sfx := `.go` for _, s := range ss { s_ := strings.TrimRight(s, sfx) fmt.Println(s_) } }
go1.16.5 Core DebugInfo Verifier
go1.16.5 Core DebugInf Verifier
The text was updated successfully, but these errors were encountered:
TrimRight takes a cutset, which means that ALL ., g, and o on the right will be removed. What you want is TrimSuffix.
TrimRight
.
g
o
TrimSuffix
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?Playground go1.16.5
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?Playground whatever.
What did you do?
Playground link
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: