aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-04-08 17:01:55 +0200
committerEddy Pedroni <epedroni@pm.me>2025-04-08 17:02:46 +0200
commit83d175b7b069bc3bbc0d600c2fab4d082e04b521 (patch)
tree9d1b7975ad16f7d5433285d3fab0a7cc38d24564 /utils.go
parent38b40d8c5a8915716b3aa46aac4a0a84d0113b25 (diff)
Python implementation with better multi-entry page support
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
-}