diff options
author | Russ Cox <rsc@golang.org> | 2009-01-30 14:39:31 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-30 14:39:31 -0800 |
commit | befc40a4e68bd0af08b6e8020598c85a9c235665 (patch) | |
tree | 23faccc99f2fcc5de337a139fb7b812a8a2f3137 /doc/progs/server1.go | |
parent | a43f0e293191f7adf93bc9e754baeb14af9fd930 (diff) | |
download | golang-befc40a4e68bd0af08b6e8020598c85a9c235665.tar.gz |
update go code tree to new func rules.
R=r
DELTA=367 (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
Diffstat (limited to 'doc/progs/server1.go')
-rw-r--r-- | doc/progs/server1.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/progs/server1.go b/doc/progs/server1.go index 51362502d..6a1b6f156 100644 --- a/doc/progs/server1.go +++ b/doc/progs/server1.go @@ -9,14 +9,14 @@ type request struct { replyc chan int; } -type binOp (a, b int) int; +type binOp func(a, b int) int; -func run(op *binOp, req *request) { +func run(op binOp, req *request) { reply := op(req.a, req.b); req.replyc <- reply; } -func server(op *binOp, service chan *request, quit chan bool) { +func server(op binOp, service chan *request, quit chan bool) { for { select { case req := <-service: @@ -27,7 +27,7 @@ func server(op *binOp, service chan *request, quit chan bool) { } } -func startServer(op *binOp) (service chan *request, quit chan bool) { +func startServer(op binOp) (service chan *request, quit chan bool) { service = make(chan *request); quit = make(chan bool); go server(op, service, quit); |