-
Brad Fitzpatrick authored
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
0836b86e
Name |
Last commit
|
Last update |
---|---|---|
doc | ||
include | ||
lib | ||
misc | ||
src | ||
test | ||
.hgignore | ||
.hgtags | ||
AUTHORS | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README | ||
favicon.ico | ||
robots.txt |