golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

Make Client.Close() more prominent in docs/examples #623

Closed gbrener closed 5 years ago

gbrener commented 5 years ago

I encountered a "too many open files" error/panic when using the docker Golang client library as documented, and traced it back to this function: https://godoc.org/docker.io/go-docker#NewEnvClient . I solved the problem by calling the Close() method on the *Client object, but because this method is not being used in any of the examples, it took me a while to find it. Perhaps we can make Close() more prominent in the documentation somehow - and/or included in the existing examples - so that this doesn't bite more people in the future.

urandom2 commented 5 years ago

Are you suggesting that the godoc site implement this change, or that the go-docker repo fix their documentation?

gbrener commented 5 years ago

Suggesting a documentation fix to the go-docker repo. Closing this issue and reposting https://github.com/docker/go-docker/issues/16.