Changed: DB Params
This commit is contained in:
20
templ/cfg/cfg.go
Normal file
20
templ/cfg/cfg.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// This package is inspired by the GOEXPERIMENT approach of allowing feature flags for experimenting with breaking changes.
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Flags struct{}
|
||||
|
||||
var Experiment = parse()
|
||||
|
||||
func parse() *Flags {
|
||||
m := map[string]bool{}
|
||||
for _, f := range strings.Split(os.Getenv("TEMPL_EXPERIMENT"), ",") {
|
||||
m[strings.ToLower(f)] = true
|
||||
}
|
||||
|
||||
return &Flags{}
|
||||
}
|
Reference in New Issue
Block a user