♻️ Use uint8 for Env

This commit is contained in:
Dan Jones 2025-01-27 15:23:46 -06:00
commit 917f919401
6 changed files with 135 additions and 21 deletions

View file

@ -23,6 +23,7 @@ func TestLoadTomlGood(t *testing.T) {
defer os.Remove(tmp.Name())
defer tmp.Close()
fmt.Fprintln(tmp, `name = "Cool"`)
fmt.Fprintln(tmp, `env = "prod"`)
fmt.Fprintln(tmp, "[stores]")
fmt.Fprintln(tmp, `store = "sqlite"`)
fmt.Fprintln(tmp, "[stores.settings.sqlite]")
@ -31,6 +32,7 @@ func TestLoadTomlGood(t *testing.T) {
c, e := LoadFromToml(tmp.Name())
assert.NoError(t, e)
assert.Equal(t, "Cool", c.Name())
assert.Equal(t, Prod, c.Env())
st, err := c.Store("")
assert.NoError(t, err)