aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/utils.go b/utils.go
deleted file mode 100644
index db36745..0000000
--- a/utils.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package main
-
-import (
- "github.com/BurntSushi/toml"
- "io/ioutil"
- "os"
- "strings"
-)
-
-type config struct {
- DocsRoot string
- TemplateFile string
- TargetDir string
- CssFile string
- BaseUrl string
-}
-
-func readConfig(file string) (cfg config) {
- _, err := toml.DecodeFile(file, &cfg)
- if err != nil {
- panic(err)
- }
- cfg.BaseUrl = strings.TrimSuffix(cfg.BaseUrl, "/")
- return
-}
-
-func nameify(raw string) (clean string) {
- clean = strings.ReplaceAll(raw, "-", " ")
- clean = strings.TrimSpace(clean)
- clean = strings.Title(clean)
- return
-}
-
-func createTempDir(name string) (path string) {
- path, err := ioutil.TempDir("", "godocs")
- if err != nil {
- panic(err)
- }
- defer os.RemoveAll(path)
-
- return
-}