go-mitm is a Go library that makes it easy to add MITM (Man in the Middle) capabilities to any Go-based HTTPS server, in particular intended for web proxies.
See example_test.go for an example on how to use it.
API documentation available on godoc.