all repos — homestead @ 5a81e51a0cea5ecc4a0d117157393825ce5445fa

Code for my website

templates/files.go (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package templates

import (
	"os"
)

var Files = os.DirFS(getEnvFallback("KO_DATA_PATH", "kodata"))

func getEnvFallback(key, fallback string) string {
	if value, found := os.LookupEnv(key); found {
		return value
	}

	return fallback
}