- Module github.com/eslider/go-config with env/yaml/json/ini packages - internal: source, keymap, merge, structconv, bytesutil - cmd/envc: convert, get, merge - docs/asr ASR-0001..0008, README/CHANGELOG/AGENTS refresh - golangci-lint v2 config; tests + fixtures Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
376 B
Go
20 lines
376 B
Go
package json
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/eslider/go-config/testfixtures"
|
|
)
|
|
|
|
func TestCodec_IdentityJSONFixture(t *testing.T) {
|
|
c := New(WithBytes(testfixtures.Load(t, "identity", "service.json")))
|
|
m, err := c.Map(context.Background())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if m["service"].(map[string]any)["name"] != "my-service" {
|
|
t.Fatalf("%#v", m)
|
|
}
|
|
}
|