about summary refs log tree commit diff stats
path: root/internal/config
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go9
-rw-r--r--internal/config/cspgenerator.go5
2 files changed, 4 insertions, 10 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 578390e..47422e7 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -4,7 +4,6 @@ import (
 	"io/fs"
 	"log/slog"
 	"net/url"
-	"os"
 
 	"github.com/BurntSushi/toml"
 	"github.com/pkg/errors"
@@ -46,14 +45,6 @@ type Config struct {
 	Menus map[string][]MenuItem
 }
 
-func getEnvFallback(key, fallback string) string {
-	if value, ok := os.LookupEnv(key); ok {
-		return value
-	} else {
-		return fallback
-	}
-}
-
 func GetConfig() (*Config, error) {
 	config := Config{}
 	slog.Debug("reading config.toml")
diff --git a/internal/config/cspgenerator.go b/internal/config/cspgenerator.go
index 0985b9e..5ad3ef0 100644
--- a/internal/config/cspgenerator.go
+++ b/internal/config/cspgenerator.go
@@ -53,10 +53,13 @@ import (
 		if err != nil {
 			return err
 		}
-		tags.Set(&structtag.Tag{
+		err = tags.Set(&structtag.Tag{
 			Key:  "toml",
 			Name: cspTag.Name,
 		})
+		if err != nil {
+			return err
+		}
 
 		_, err = fmt.Fprintf(file, "\t%-23s %-28s `%s`\n", field.Name, t, tags.String())
 		if err != nil {