Closed telenieko closed 6 years ago
Hi @telenieko - fair assumption & I do develop on OSX. I suspect the build tags may be interfering with go get
s ability to fetch the package. Will see if there's a workaround. In the meantime, if you execute:
go get github.com/zcalusic/sysinfo
directly are you able to build a Sparta app?
Added a precondition check - will be available in 1.0.2:
...
ERRO[0000] Failed to validate preconditions: Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms
exit status 1
@mweagle, yes the workaround works:
go get github.com/zcalusic/sysinfo
# github.com/zcalusic/sysinfo
../../github.com/zcalusic/sysinfo/kernel.go:24:12: undefined: syscall.Utsname
../../github.com/zcalusic/sysinfo/kernel.go:25:12: undefined: syscall.Uname
Updated error text:
INFO[0000] main.go:7:2: cannot find package "github.com/zcalusic/sysinfo" in any of:
INFO[0000] /Users/mweagle/Documents/go192/src/github.com/zcalusic/sysinfo (from $GOROOT)
INFO[0000] /Users/mweagle/Documents/gopath/src/github.com/zcalusic/sysinfo (from $GOPATH)
ERRO[0000] The `github.com/zcalusic/sysinfo` package is not installed gopath=/Users/mweagle/Documents/gopath os=darwin sysinfoMarkerPath=/Users/mweagle/Documents/gopath/src/github.com/zcalusic/sysinfo/sysinfo.go
...
ERRO[0000] Failed to validate preconditions: Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms. When you `go get` the package, you may see errors as in `undefined: syscall.Utsname`. These are expected and can be ignored
Documentation does not state which platforms are supported for development, so one would guess any platform supported by golang is good but...
Following the getting started from Mac OS, when doing the go run main.go ...
As far as I understand zcalusic/sysinfo is Linux only.