all repos — flounder @ 7e0b032dd3df947f42db5dd912a424c88ce03c03

A small site builder for the Gemini protocol

config.go (view raw)

 1package main
 2
 3import (
 4	"github.com/BurntSushi/toml"
 5)
 6
 7type Config struct {
 8	FilesPath  string
 9	RootDomain string
10	SiteTitle  string
11	Debug      bool
12	SecretKey  string
13}
14
15func getConfig(filename string) (Config, error) {
16	var config Config
17	// Attempt to overwrite defaults from file
18	_, err := toml.DecodeFile(filename, &config)
19	if err != nil {
20		return config, err
21	}
22	return config, nil
23}