shurcooL/goexec

failing on go version go1.14.6 darwin/amd64

gedw99 opened this issue · 2 comments

Was working but latest go seems to have broken it

`

goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir("/Users/apple/workspace/go/src/git.sr.ht/~eliasnaur/gio/bin-www/kitchen")))'
(*net.OpError)(&net.OpError{
        Op:     (string)("listen"),
        Net:    (string)("tcp"),
        Source: (net.Addr)(nil),
        Addr: (*net.TCPAddr)(&net.TCPAddr{
                IP:   (net.IP)(nil),
                Port: (int)(8080),
                Zone: (string)(""),
        }),
        Err: (*os.SyscallError)(&os.SyscallError{
                Syscall: (string)("bind"),
                Err:     (syscall.Errno)(0x30),
        }),
})

env


go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/apple/workspace/go/bin"
GOCACHE="/Users/apple/Library/Caches/go-build"
GOENV="/Users/apple/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build390270522=/tmp/go-build -gno-record-gcc-switches -fno-common"

goexec seems to be correctly executing the code and printing the output.

The call to http.ListenAndServe is returning a net.OpError with the underlying error being that the “bind” syscall failed. It’s likely you already have something else running and taking up port 8080.

doooh :) thanks and closing.