aboutsummaryrefslogtreecommitdiff
path: root/cmd/server/main.go
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-07-18 16:27:24 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-07-18 16:27:24 -0400
commitbcf6d391f17a193c81ad6643f8d006de6c6abad8 (patch)
treeb8eaec45b02d79f8d51d6726ffbbe34ce5de2ed7 /cmd/server/main.go
parent904e37a88a6a2eab3919f7f2c40bbb2c07544a7c (diff)
downloadgo-website-0.0.13.tar.gz
go-website-0.0.13.tar.xz
Adjust the program a bit, remove clunky "head" templates. Add an example site among other improvementsv0.0.13
Diffstat (limited to 'cmd/server/main.go')
-rw-r--r--cmd/server/main.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 4b2c1ad..00aecbf 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -19,18 +19,6 @@ func VersionPrint() {
os.Exit(0)
}
-func loadConf(fn string) (*App, error) {
- fh, err := os.Open(fn)
- if err != nil {
- return nil, err
- }
- dec := yaml.NewDecoder(fh)
-
- app := &App{}
- err = dec.Decode(app)
- return app, err
-}
-
func main() {
fl := flag.NewFlagSet("Website", flag.ExitOnError)
listen := fl.String("l", "0.0.0.0:8001", "Listening address")
@@ -61,12 +49,6 @@ func main() {
if app.ReIndexPath == "" || *indexPath != defaultIndexPath {
app.ReIndexPath = *indexPath
}
- if app.StaticDirectory == "" {
- app.StaticDirectory = "static"
- }
- if app.FeedPrefix == "" {
- app.FeedPrefix = FeedPrefixDefault
- }
if *verbose {
b, _ := yaml.Marshal(app)