镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
tv42Public

About

Mock object for Go http.ResponseWriter

Resources

Stars

23 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

mockhttp -- Go package for unit testing HTTP serving

Unit testing HTTP services written in Go means you need to call their ServeHTTP receiver. For this, you need something that fulfills the http.ResponseWriter interface, and you need to populate a http.Request struct with suitable-looking data. mockhttp.go helps you do these tasks, without excessive copy-pasting.

See mockhttp_test.go for an example of usage.

About

Mock object for Go http.ResponseWriter

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages