feat(go-config): multi-format codecs, envc CLI, fixtures, ASRs
- 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>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
a:
|
||||
b:
|
||||
c:
|
||||
d:
|
||||
e: leaf
|
||||
@@ -0,0 +1,4 @@
|
||||
topLevel: 1
|
||||
sub-Service: 2
|
||||
snake_case: 3
|
||||
CamelCase: 4
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"flag": true,
|
||||
"count": 42,
|
||||
"ratio": 3.14,
|
||||
"nothing": null,
|
||||
"nested": [1, 2]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
SERVICE_NAME=my-service
|
||||
SERVICE_SUBSERVICE_NAME=abc
|
||||
SERVICE_SUBSERVICE_KEY=abs
|
||||
SERVICE_SUBSERVICE_TIMEOUT=30
|
||||
SERVICE_SUBSERVICE_ENABLED=true
|
||||
SERVICE_DATABASE_URL=postgres://localhost:5432/db
|
||||
SERVICE_DATABASE_POOLSIZE=10
|
||||
@@ -0,0 +1,12 @@
|
||||
[service]
|
||||
name = my-service
|
||||
|
||||
[service.subservice]
|
||||
name = abc
|
||||
key = abs
|
||||
timeout = 30
|
||||
enabled = true
|
||||
|
||||
[service.database]
|
||||
url = postgres://localhost:5432/db
|
||||
pool-size = 10
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"service": {
|
||||
"name": "my-service",
|
||||
"sub-service": {
|
||||
"name": "abc",
|
||||
"key": "abs",
|
||||
"timeout": 30,
|
||||
"enabled": true
|
||||
},
|
||||
"database": {
|
||||
"url": "postgres://localhost:5432/db",
|
||||
"pool-size": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
service:
|
||||
name: my-service
|
||||
sub-service:
|
||||
name: abc
|
||||
key: abs
|
||||
timeout: 30
|
||||
enabled: true
|
||||
database:
|
||||
url: postgres://localhost:5432/db
|
||||
pool-size: 10
|
||||
@@ -0,0 +1,3 @@
|
||||
[sec]
|
||||
a = 1
|
||||
a = 2
|
||||
@@ -0,0 +1 @@
|
||||
{ not json
|
||||
@@ -0,0 +1 @@
|
||||
service: [unclosed
|
||||
@@ -0,0 +1,7 @@
|
||||
SERVICE_NAME=default-name
|
||||
SERVICE_SUBSERVICE_NAME=default-sub
|
||||
SERVICE_SUBSERVICE_KEY=default-key
|
||||
SERVICE_SUBSERVICE_TIMEOUT=1
|
||||
SERVICE_SUBSERVICE_ENABLED=false
|
||||
SERVICE_DATABASE_URL=postgres://old
|
||||
SERVICE_DATABASE_POOLSIZE=1
|
||||
@@ -0,0 +1,13 @@
|
||||
service:
|
||||
name: default-name
|
||||
sub-service:
|
||||
name: default-sub
|
||||
key: default-key
|
||||
timeout: 1
|
||||
enabled: false
|
||||
hosts:
|
||||
- a
|
||||
- b
|
||||
database:
|
||||
url: postgres://old
|
||||
pool-size: 1
|
||||
@@ -0,0 +1,14 @@
|
||||
service:
|
||||
name: default-name
|
||||
sub-service:
|
||||
name: overlay-name
|
||||
key: default-key
|
||||
timeout: 1
|
||||
enabled: false
|
||||
hosts:
|
||||
- a
|
||||
- b
|
||||
- x
|
||||
database:
|
||||
url: postgres://old
|
||||
pool-size: 1
|
||||
@@ -0,0 +1,12 @@
|
||||
service:
|
||||
name: default-name
|
||||
sub-service:
|
||||
name: overlay-name
|
||||
key: default-key
|
||||
timeout: 1
|
||||
enabled: false
|
||||
hosts:
|
||||
- x
|
||||
database:
|
||||
url: postgres://old
|
||||
pool-size: 1
|
||||
@@ -0,0 +1 @@
|
||||
SERVICE_SUBSERVICE_NAME=overlay-name
|
||||
@@ -0,0 +1,5 @@
|
||||
service:
|
||||
sub-service:
|
||||
name: overlay-name
|
||||
hosts:
|
||||
- x
|
||||
Reference in New Issue
Block a user