Add config file, handle it with Viper, add a command to open it in an editor
This commit is contained in:
parent
b8a8ba2e08
commit
61aa5880d3
234 changed files with 44636 additions and 383 deletions
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue