go get github.com/valyala/fasthttp compile errors
kngu9 opened this issue · 5 comments
I seem to be having problems when I am trying to fetch the package. This is the error I am getting:
github.com/valyala/fasthttp
src/github.com/valyala/fasthttp/bytesconv.go:53: date.In(gmtLocation).AppendFormat undefined (type time.Time has no field or method AppendFormat)
src/github.com/valyala/fasthttp/header.go:1125: undefined: bytes.LastIndexByte
src/github.com/valyala/fasthttp/header.go:1450: r.Discard undefined (type *bufio.Reader has no field or method Discard)
src/github.com/valyala/fasthttp/http.go:430: undefined: io.CopyBuffer
src/github.com/valyala/fasthttp/uri.go:221: undefined: bytes.LastIndexByte
src/github.com/valyala/fasthttp/uri.go:233: undefined: bytes.LastIndexByte
what go version do you have - type go version
in your command line.
go version go1.4.2 darwin/amd64
Your issue is your go version, the error is Time.AppendFormat
which was added to the language in 2015/04/10 - April, and your go version was released on 2015/02/17 - February.
Download the latest go 1.5.1
https://golang.org/dl/
Actually that brings up the point that this library should explicitly state what go version it was built on / required to run on.