tylerstillwater / graceful

Graceful is a Go package enabling graceful shutdown of an http.Handler server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"go get" throwing an error

thezelus opened this issue · comments

I am getting following error when I try to get this package using go get

go get github.com/stretchr/graceful

github.com/stretchr/graceful

../github.com/stretchr/graceful/graceful.go:38: server.ConnState undefined (type *http.Server has no field or method ConnState)
../github.com/stretchr/graceful/graceful.go:38: undefined: http.ConnState
../github.com/stretchr/graceful/graceful.go:40: undefined: http.StateActive
../github.com/stretchr/graceful/graceful.go:42: undefined: http.StateClosed
../github.com/stretchr/graceful/graceful.go:42: undefined: http.StateIdle
../github.com/stretchr/graceful/graceful.go:77: server.SetKeepAlivesEnabled undefined (type *http.Server has no field or method SetKeepAlivesEnabled)

Server.ConnState is a new addition to go and is only available in the go version 1.3 which is currently in beta 2 and scheduled to be released in early June.

The readme makes note of that at the end of the page.

You can already use it with the prereleases of go 1.3 or when using go from tip.