1
0
mirror of https://github.com/golang/go synced 2024-11-21 19:14:44 -07:00

rpc: convert /debug/rpc handler to exp/template

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4819048
This commit is contained in:
Rob Pike 2011-07-26 14:44:51 -07:00
parent e21f69338b
commit 7e1101d470

View File

@ -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