more @tianon changes
This commit is contained in:
parent
0c8155ad91
commit
b4956ca703
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -37,7 +37,7 @@ func writePageError(w http.ResponseWriter, message string, code int) error {
|
||||||
return writePage(w, message, code)
|
return writePage(w, message, code)
|
||||||
}
|
}
|
||||||
|
|
||||||
func writePageGo(w http.ResponseWriter, path string, pkg *Package, code int) error {
|
func writePageGo(w http.ResponseWriter, path string, pkg Package, code int) error {
|
||||||
return writePage(w, fmt.Sprintf(`<!DOCTYPE html><html>
|
return writePage(w, fmt.Sprintf(`<!DOCTYPE html><html>
|
||||||
<head><meta charset="utf-8"><title>%s</title><meta name="go-import" content="%s %s %s"></head>
|
<head><meta charset="utf-8"><title>%s</title><meta name="go-import" content="%s %s %s"></head>
|
||||||
<body>%s</body>
|
<body>%s</body>
|
||||||
|
@ -57,8 +57,8 @@ func loadConfig() (ret []Package, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadRoutes(packages []Package) (routes map[string]*Package) {
|
func loadRoutes(packages []Package) (routes map[string]Package) {
|
||||||
routes = map[string]*Package{}
|
routes = map[string]Package{}
|
||||||
|
|
||||||
for _, pkg := range packages {
|
for _, pkg := range packages {
|
||||||
for _, route := range pkg.GetRoutes() {
|
for _, route := range pkg.GetRoutes() {
|
||||||
|
|
Loading…
Reference in a new issue