You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\flori\AppData\Local\go-build
set GOENV=C:\Users\flori\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS= -mod=vendor
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=github.com/dlsniper
set GONOSUMDB=github.com/dlsniper
set GOOS=windows
set GOPATH=C:\Users\flori\go
set GOPRIVATE=github.com/dlsniper
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\go-sdk\go1.13.3
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\go-sdk\go1.13.3\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\flori\GoLandProjects\awesomeProject10\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\flori\AppData\Local\Temp\go-build483047210=/tmp/go-build -gno-record-gcc-switches
What did you do?
remove/move the $GOPATH/pkg/mod directory
create a Go Modules project with the following source code:
package main
import"fmt"import _ "github.com/gorilla/mux"funcmain() {
fmt.Println("demo")
}
run go mod vendor
set GOFLAGS=-mod=vendor
run go fmt main.go
What did you expect to see?
I expected the Go source code to be formatted.
What did you see instead?
The source code was formatted only after the go fmt command downloaded the github.com/gorilla/mux from the Internet. This is unexpected as I have the source code inside the vendor folder so it shouldn't be downloaded again.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go mod vendor
GOFLAGS=-mod=vendor
go fmt main.go
What did you expect to see?
I expected the Go source code to be formatted.
What did you see instead?
The source code was formatted only after the
go fmt
command downloaded thegithub.com/gorilla/mux
from the Internet. This is unexpected as I have the source code inside the vendor folder so it shouldn't be downloaded again.The text was updated successfully, but these errors were encountered: