Skip to content

affected/package: fmt #56713

New issue

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

Closed
sandeepkalra opened this issue Nov 11, 2022 · 2 comments
Closed

affected/package: fmt #56713

sandeepkalra opened this issue Nov 11, 2022 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@sandeepkalra
Copy link

What version of Go are you using (go version)?

$ go version
go1.19.3

Does this issue reproduce with the latest release?

I have checked with only official go1.19.3

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
O111MODULE=""
GOARCH="amd64"
GOBIN="/home/bpadmin/go/bin"
GOCACHE="/home/bpadmin/.cache/go-build"
GOENV="/home/bpadmin/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/bpadmin/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/bpadmin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/bpadmin/repos/sankalra/chetak.git/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build419792306=/tmp/go-build -gno-record-gcc-switches"

What did you do?

included multiple build tags in code so that build compilation can happen for multiple platforms
I build code for more than 1 OS - say linux and darwin. I have code that is sometimes debug only, and they can be different based on tag set "production, linux" , "production,darwin", "production", "linux", etc

in go code, I have
// +build tag1, tag2

also tried
// +build tag1, tag2
and
// +build tag1
// +build tag2

the build works. But when automating, I run "go fmt" and "golint" etc, and found that "go fmt" removes tag2 and onwards.

What did you expect to see?

go fmt must work with multiple tags

What did you see instead?

go fmt is breaking my automation build

@seankhliao
Copy link
Member

This isn't reproducible.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 11, 2022
@sandeepkalra
Copy link
Author

sorry, it is sorted out. Not a bug!

@golang golang locked and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants