Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go get github.com/valyala/fasthttp compile errors #5

Closed
kngu9 opened this issue Nov 24, 2015 · 5 comments
Closed

go get github.com/valyala/fasthttp compile errors #5

kngu9 opened this issue Nov 24, 2015 · 5 comments

Comments

@kngu9
Copy link

kngu9 commented Nov 24, 2015

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

@abacaj
Copy link

abacaj commented Nov 24, 2015

what go version do you have - type go version in your command line.

@kngu9
Copy link
Author

kngu9 commented Nov 24, 2015

go version go1.4.2 darwin/amd64

@abacaj
Copy link

abacaj commented Nov 24, 2015

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/

@abacaj
Copy link

abacaj commented Nov 24, 2015

Actually that brings up the point that this library should explicitly state what go version it was built on / required to run on.

@valyala
Copy link
Owner

valyala commented Nov 28, 2015

Explicitly stated in readme that fasthttp supports only go1.5+.

Older versions won't be supported, since their standard library miss useful functions and I have no desire writing workarounds for them :) See the initial bug report from @kngu9 for the list of missing functions.

@valyala valyala closed this as completed Nov 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants