diff options
| author | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
| commit | 839a68469b6f8bf40620a7977041e089bbd0eba3 (patch) | |
| tree | f8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /src/lib/http | |
| parent | 0183baaf449338f54727814d079c0254c18226f9 (diff) | |
| download | go-839a68469b6f8bf40620a7977041e089bbd0eba3.tar.xz | |
delete export
TBR=r
OCL=23121
CL=23127
Diffstat (limited to 'src/lib/http')
| -rw-r--r-- | src/lib/http/conn.go | 4 | ||||
| -rw-r--r-- | src/lib/http/request.go | 6 | ||||
| -rw-r--r-- | src/lib/http/server.go | 4 | ||||
| -rw-r--r-- | src/lib/http/url.go | 10 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/http/conn.go b/src/lib/http/conn.go index 15c0707f3e..909863ef58 100644 --- a/src/lib/http/conn.go +++ b/src/lib/http/conn.go @@ -12,7 +12,7 @@ import ( ) // Active HTTP connection (server side). -export type Conn struct { +type Conn struct { rwc io.ReadWriteClose; br *bufio.BufRead; bw *bufio.BufWrite; @@ -21,7 +21,7 @@ export type Conn struct { } // Create new connection from rwc. -export func NewConn(rwc io.ReadWriteClose) (c *Conn, err *os.Error) { +func NewConn(rwc io.ReadWriteClose) (c *Conn, err *os.Error) { c = new(Conn); c.rwc = rwc; if c.br, err = bufio.NewBufRead(rwc); err != nil { diff --git a/src/lib/http/request.go b/src/lib/http/request.go index 1335c48b42..ba1a7a694f 100644 --- a/src/lib/http/request.go +++ b/src/lib/http/request.go @@ -19,7 +19,7 @@ const ( _MaxHeaderLines = 1024; ) -export var ( +var ( LineTooLong = os.NewError("http header line too long"); ValueTooLong = os.NewError("http header value too long"); HeaderTooLong = os.NewError("http header too long"); @@ -29,7 +29,7 @@ export var ( ) // HTTP Request -export type Request struct { +type Request struct { method string; // GET, PUT,etc. rawurl string; url *URL; // URI after GET, PUT etc. @@ -180,7 +180,7 @@ func parseHTTPVersion(vers string) (int, int, bool) { } // Read and parse a request from b. -export func ReadRequest(b *bufio.BufRead) (req *Request, err *os.Error) { +func ReadRequest(b *bufio.BufRead) (req *Request, err *os.Error) { req = new(Request); // First line: GET /index.html HTTP/1.0 diff --git a/src/lib/http/server.go b/src/lib/http/server.go index 20bfef43bb..13648ad58f 100644 --- a/src/lib/http/server.go +++ b/src/lib/http/server.go @@ -36,7 +36,7 @@ func serveConnection(fd net.Conn, raddr string, f *(*Conn, *Request)) { } // Web server: already listening on l, call f for each request. -export func Serve(l net.Listener, f *(*Conn, *Request)) *os.Error { +func Serve(l net.Listener, f *(*Conn, *Request)) *os.Error { // TODO: Make this unnecessary s, e := os.Getenv("GOMAXPROCS"); if n, ok := strconv.Atoi(s); n < 3 { @@ -54,7 +54,7 @@ export func Serve(l net.Listener, f *(*Conn, *Request)) *os.Error { } // Web server: listen on address, call f for each request. -export func ListenAndServe(addr string, f *(*Conn, *Request)) *os.Error { +func ListenAndServe(addr string, f *(*Conn, *Request)) *os.Error { l, e := net.Listen("tcp", addr); if e != nil { return e diff --git a/src/lib/http/url.go b/src/lib/http/url.go index 865b7864a2..9c1a94e2b9 100644 --- a/src/lib/http/url.go +++ b/src/lib/http/url.go @@ -12,7 +12,7 @@ import ( "strings" ) -export var ( +var ( BadURL = os.NewError("bad url syntax") ) @@ -41,7 +41,7 @@ func unhex(c byte) byte { } // Unescape %xx into hex. -export func URLUnescape(s string) (string, *os.Error) { +func URLUnescape(s string) (string, *os.Error) { // Count %, check that they're well-formed. n := 0; for i := 0; i < len(s); { @@ -76,7 +76,7 @@ export func URLUnescape(s string) (string, *os.Error) { return string(t), nil; } -export type URL struct { +type URL struct { raw string; scheme string; rawpath string; @@ -127,7 +127,7 @@ func split(s string, c byte, cutc bool) (string, string) { } // Parse rawurl into a URL structure. -export func ParseURL(rawurl string) (url *URL, err *os.Error) { +func ParseURL(rawurl string) (url *URL, err *os.Error) { if rawurl == "" { return nil, BadURL } @@ -172,7 +172,7 @@ export func ParseURL(rawurl string) (url *URL, err *os.Error) { } // A URL reference is a URL with #frag potentially added. Parse it. -export func ParseURLReference(rawurlref string) (url *URL, err *os.Error) { +func ParseURLReference(rawurlref string) (url *URL, err *os.Error) { // Cut off #frag. rawurl, frag := split(rawurlref, '#', true); if url, err = ParseURL(rawurl); err != nil { |
