http: Transport hook to register non-http(s) protocols
This permits external packages implementing e.g. FTP or gopher to register themselves with the http.DefaultClient: package ftp func init() { http.DefaultTransport.RegisterProtocol("ftp", &ftp{}) } Client code would look like: import ( _ "github.com/exampleuser/go/gopher" _ "github.com/exampleuser/go/ftp" ) func main() { resp, err := http.Get("ftp://example.com/path.txt") ... } R=dsymonds, rsc CC=golang-dev https://golang.org/cl/4526077
Showing
Please
register
or
sign in
to comment