What version of Go are you using (go version)?
$ go version
go version go1.12.9 linux/amd64
Does this issue reproduce with the latest release?
Yes, tested with format button on https://play.golang.org/p/Ei6Hu4QqAHa
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/{username}/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/{username}/go"
GOPROXY=""
GORACE=""
GOROOT="/snap/go/4301"
GOTMPDIR=""
GOTOOLDIR="/snap/go/4301/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build430600410=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Operators inside function calls are inconsistently formatted depending if they are inside append or not.
What did you expect to see?
bar := []int{
baz(1 * 2),
}
bar = append(bar,
baz(1 * 2),
)
What did you see instead?
bar := []int{
baz(1 * 2),
}
bar = append(bar,
baz(1*2),
)
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes, tested with
formatbutton on https://play.golang.org/p/Ei6Hu4QqAHaWhat operating system and processor architecture are you using (
go env)?go envOutput$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/{username}/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/{username}/go" GOPROXY="" GORACE="" GOROOT="/snap/go/4301" GOTMPDIR="" GOTOOLDIR="/snap/go/4301/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build430600410=/tmp/go-build -gno-record-gcc-switches"What did you do?
Operators inside function calls are inconsistently formatted depending if they are inside
appendor not.What did you expect to see?
What did you see instead?