update go code tree to new func rules.

R=r
DELTA=367  (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
This commit is contained in:
Russ Cox 2009-01-30 14:39:31 -08:00
parent b59dbd7fe0
commit 4cf7711568
24 changed files with 169 additions and 121 deletions

View file

@ -17,7 +17,7 @@ import (
)
// Serve a new connection.
func serveConnection(fd net.Conn, raddr string, f *(*Conn, *Request)) {
func serveConnection(fd net.Conn, raddr string, f func(*Conn, *Request)) {
c, err := NewConn(fd);
if err != nil {
return
@ -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.
func Serve(l net.Listener, f *(*Conn, *Request)) *os.Error {
func Serve(l net.Listener, f func(*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 @@ func Serve(l net.Listener, f *(*Conn, *Request)) *os.Error {
}
// Web server: listen on address, call f for each request.
func ListenAndServe(addr string, f *(*Conn, *Request)) *os.Error {
func ListenAndServe(addr string, f func(*Conn, *Request)) *os.Error {
l, e := net.Listen("tcp", addr);
if e != nil {
return e