Refactor project to more conventional layout

drew/sql-it
Drew Bednar 7 months ago
parent 14882e1add
commit 16e5df26d6

@ -0,0 +1,5 @@
build:
go build -o ./bin/gowiki ./cmd/gowiki/main.go
clean:
rm -rf ./bin/gowiki

@ -1,6 +1,7 @@
package main package main
import ( import (
"gowiki/common"
"log" "log"
"net/http" "net/http"
"os" "os"
@ -8,8 +9,8 @@ import (
"text/template" "text/template"
) )
var template_dir string = GetDefaultEnv("GOWIKI_TEMPLATE_DIR", "./tmpl") var template_dir string = common.GetDefaultEnv("GOWIKI_TEMPLATE_DIR", "./tmpl")
var data_dir string = GetDefaultEnv("GOWIKI_DATA_DIR", "./data") var data_dir string = common.GetDefaultEnv("GOWIKI_DATA_DIR", "./data")
// Template caching // Template caching
// var templates = template.Must(template.ParseFiles("edit.html", "view.html")) // var templates = template.Must(template.ParseFiles("edit.html", "view.html"))

@ -1,4 +1,4 @@
package main package common
import "os" import "os"
Loading…
Cancel
Save