Add config file, handle it with Viper, add a command to open it in an editor

This commit is contained in:
Ken-Håvard Lieng 2015-05-25 04:00:21 +02:00
parent b8a8ba2e08
commit 61aa5880d3
234 changed files with 44636 additions and 383 deletions

File diff suppressed because one or more lines are too long

View file

@ -8,6 +8,8 @@ import (
"strconv"
"strings"
"time"
"github.com/khlieng/name_pending/assets"
)
var files = []File{
@ -41,7 +43,7 @@ func serveFiles(w http.ResponseWriter, r *http.Request) {
}
func serveFile(w http.ResponseWriter, r *http.Request, path, contentType string) {
info, err := AssetInfo(path)
info, err := assets.AssetInfo(path)
if err != nil {
http.Error(w, "", http.StatusInternalServerError)
return
@ -51,7 +53,7 @@ func serveFile(w http.ResponseWriter, r *http.Request, path, contentType string)
return
}
data, err := Asset(path)
data, err := assets.Asset(path)
if err != nil {
http.Error(w, "", http.StatusInternalServerError)
return