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
Please answer these questions before submitting your issue. Thanks!
wrote a small function with unexpected results see https://play.golang.org/p/1YFPR3ShVUx
the 2 lines in main() are identical except for the writing of "SpeciMen40" and "Specimen40"
str := "enum('Quader','Irregular','SpeciMen40','Type1','Type2')" fmt.Println("return: ", trimTypeString(str)) str = "enum('Quader','Irregular','Specimen40','Type1','Type2')" fmt.Println("return: ", trimTypeString(str))
If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best.
---> https://play.golang.org/p/1YFPR3ShVUx
go version go1.12.4 linux/amd64 GOARCH="amd64" GOBIN="/home/herotto/prog/go/bin" GOCACHE="/home/herotto/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/herotto/prog/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go-1.12/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.12/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" GOROOT/bin/go version: go version go1.8 linux/amd64 GOROOT/bin/go tool compile -V: compile version go1.12.4 uname -sr: Linux 4.15.0-47-generic LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic /lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27. gdb --version: GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
The text was updated successfully, but these errors were encountered:
TrimRight doesn't do what you think it does. See the example at https://golang.org/pkg/strings/#TrimRight. You are almost certainly looking for TrimSuffix.
TrimRight
TrimSuffix
Sorry, something went wrong.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What did you do?
wrote a small function with unexpected results
see https://play.golang.org/p/1YFPR3ShVUx
the 2 lines in main() are identical except for the writing of "SpeciMen40" and "Specimen40"
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
---> https://play.golang.org/p/1YFPR3ShVUx
What did you expect to see? same result for both runs of the function
What did you see instead? different resuts
System details
The text was updated successfully, but these errors were encountered: