Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7e1101d4
Commit
7e1101d4
authored
Jul 26, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc: convert /debug/rpc handler to exp/template
R=golang-dev, adg CC=golang-dev
https://golang.org/cl/4819048
parent
e21f6933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
debug.go
src/pkg/rpc/debug.go
+9
-9
No files found.
src/pkg/rpc/debug.go
View file @
7e1101d4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment