Last active
March 18, 2019 00:05
-
-
Save kyoh86/1db4f5d8f15c1e7bedb76ef57d8853c7 to your computer and use it in GitHub Desktop.
play.golang.org does not equal to darwin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
_, err := os.Stat("") | |
fmt.Println(err) | |
fmt.Println(os.IsNotExist(err)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go run main.go | |
stat : no such file or directory | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run --rm -it -v $PWD:/go/src/github.com/kyoh86/tryout -w /go/src/github.com/kyoh86/tryout golang:latest go run main.go | |
stat : no such file or directory | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://play.golang.org/p/HcShoLxLj5_t | |
stat : Invalid argument | |
false | |
Program exited. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go version | |
go version go1.12.1 darwin/amd64 | |
$ go env | |
GOARCH="amd64" | |
GOBIN="" | |
GOCACHE="/Users/kyoh86/Library/Caches/go-build" | |
GOEXE="" | |
GOFLAGS="" | |
GOHOSTARCH="amd64" | |
GOHOSTOS="darwin" | |
GOOS="darwin" | |
GOPATH="/Users/kyoh86/go" | |
GOPROXY="" | |
GORACE="" | |
GOROOT="/usr/local/Cellar/go/1.12.1/libexec" | |
GOTMPDIR="" | |
GOTOOLDIR="/usr/local/Cellar/go/1.12.1/libexec/pkg/tool/darwin_amd64 | |
" | |
GCCGO="gccgo" | |
CC="clang" | |
CXX="clang++" | |
CGO_ENABLED="1" | |
GOMOD="/Users/kyoh86/Projects/github.com/kyoh86/gogh/go.mod" | |
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 -fno-caret-diagnostics -Qunused-argu | |
ments -fmessage-length=0 -fdebug-prefix-map=/var/folders/90/1ymfxwdx | |
67d3f33zz1qkchdw0000gn/T/go-build293153577=/tmp/go-build -gno-record | |
-gcc-switches -fno-common" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment