diff options
author | Jordan <me@jordan.im> | 2022-01-01 19:43:19 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-01-01 19:43:19 -0700 |
commit | 4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9 (patch) | |
tree | ecec1f79a373cb2331de9b8011177ae2db9d039b /crane.go | |
parent | 8401a6bdeec321920550f813a1c7843ed6e66a44 (diff) | |
download | crane-4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9.tar.gz crane-4f1178fc2a3e5865c2fb1c16c83fc1abb15484f9.zip |
crane, http, util: housekeeping, performance improvements, styling
Diffstat (limited to 'crane.go')
-rw-r--r-- | crane.go | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -36,7 +36,6 @@ var ( user string pass string buildPrefix string - templateDir string ) type Contributor struct { @@ -639,18 +638,6 @@ func main() { panic(errors.New("Host flag could not be parsed; is it an IP address?")) } - // prefer system-installed template assets over project-local paths - if _, err := os.Stat(filepath.Join(buildPrefix, - "/share/crane/templates")); err != nil { - dir, err := filepath.Abs(filepath.Dir(os.Args[0])) - if err != nil { - log.Fatal(err) - } - templateDir = filepath.Join(dir, "templates") - } else { - templateDir = filepath.Join(buildPrefix, "/share/crane/templates") - } - http.HandleFunc("/", papers.IndexHandler) http.HandleFunc("/admin/", papers.AdminHandler) http.HandleFunc("/admin/edit/", papers.EditHandler) |