kcmerrill / alfred

(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
MIT License
63 stars 14 forks source link

Document required version of go #59

Closed iilyak closed 6 years ago

iilyak commented 6 years ago

I am trying to build a binary for MacOS from docker container which runs linux. I used to use following commands to build previous versions of alfred.

Start docker container

docker run --rm -it -v "$PWD":/usr/src/app -w /usr/src/app golang bash

Inside docker container run

GOPATH=/usr/src/app/build GOOS=darwin GOARCH=amd64 go get github.com/kcmerrill/alfred

Here is the output I get

# github.com/kcmerrill/alfred/alfred
build/src/github.com/kcmerrill/alfred/alfred/output.go:67: time.Since(context.Started).Round undefined (type time.Duration has no field or method Round)
build/src/github.com/kcmerrill/alfred/alfred/summary.go:18: time.Since(context.Started).Round undefined (type time.Duration has no field or method Round)
build/src/github.com/kcmerrill/alfred/alfred/summary.go:20: time.Since(context.Started).Round undefined (type time.Duration has no field or method Round)

I have go version 1.8.3

# go version
go version go1.8.3 linux/amd64

Could you document which version of go is required?

iilyak commented 6 years ago

BTW it compiles fine with 1.9.2

kcmerrill commented 6 years ago

It requires 1.9

https://github.com/kcmerrill/alfred/blob/master/Dockerfile#L1