From: Rob Pike Date: Tue, 26 Jul 2011 21:44:51 +0000 (-0700) Subject: rpc: convert /debug/rpc handler to exp/template X-Git-Tag: weekly.2011-07-29~47 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7e1101d470a21b2023e4363cc277836b50d3763f;p=gostls13.git rpc: convert /debug/rpc handler to exp/template R=golang-dev, adg CC=golang-dev https://golang.org/cl/4819048 --- 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 = ` Services - {.repeated section @} + {{range .}}
- Service {Name} + Service {{.Name}}
- {.repeated section Method} + {{range .Method}} - - + + - {.end} + {{end}}
MethodCalls
{Name}({Type.ArgType}, {Type.ReplyType}) os.Error{Type.NumCalls}{{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) os.Error{{.Type.NumCalls}}
- {.end} + {{end}} ` -var debug = template.MustParse(debugText, nil) +var debug = template.New("RPC debug").MustParse(debugText) type debugMethod struct { Type *methodType