diff options
author | Rob Pike <r@golang.org> | 2011-07-26 14:44:51 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2011-07-26 14:44:51 -0700 |
commit | 7e1101d470a21b2023e4363cc277836b50d3763f (patch) | |
tree | bca30e58a389030b9e379b9c4146b3dbfb52c5f1 | |
parent | e21f69338b64f81d40af42dbb1ce1ee5e23309f8 (diff) | |
download | go-7e1101d470a21b2023e4363cc277836b50d3763f.tar.gz go-7e1101d470a21b2023e4363cc277836b50d3763f.zip |
rpc: convert /debug/rpc handler to exp/template
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4819048
-rw-r--r-- | src/pkg/rpc/debug.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/rpc/debug.go b/src/pkg/rpc/debug.go index 32dc8a18ba..e0602e676f 100644 --- a/src/pkg/rpc/debug.go +++ b/src/pkg/rpc/debug.go @@ -10,33 +10,33 @@ package rpc */ import ( + "exp/template" "fmt" "http" "sort" - "template" ) const debugText = `<html> <body> <title>Services</title> - {.repeated section @} + {{range .}} <hr> - Service {Name} + Service {{.Name}} <hr> <table> <th align=center>Method</th><th align=center>Calls</th> - {.repeated section Method} + {{range .Method}} <tr> - <td align=left font=fixed>{Name}({Type.ArgType}, {Type.ReplyType}) os.Error</td> - <td align=center>{Type.NumCalls}</td> + <td align=left font=fixed>{{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) os.Error</td> + <td align=center>{{.Type.NumCalls}}</td> </tr> - {.end} + {{end}} </table> - {.end} + {{end}} </body> </html>` -var debug = template.MustParse(debugText, nil) +var debug = template.New("RPC debug").MustParse(debugText) type debugMethod struct { Type *methodType |