Skip to content

feat(sdk): add contrib/envconfig struct field adapter#867

Merged
zeevdr merged 6 commits into
mainfrom
feat/16-contrib-envconfig
Jun 5, 2026
Merged

feat(sdk): add contrib/envconfig struct field adapter#867
zeevdr merged 6 commits into
mainfrom
feat/16-contrib-envconfig

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented Jun 5, 2026

Summary

  • There was no ergonomic way to populate Go struct fields from OpenDecree config values; callers had to write field-by-field Get* calls manually.
  • Added sdk/contrib/envconfig — a new module that reads decree:"<field-path>" struct tags and fetches each field value from the configclient in one Process call.
  • Supports string, bool, int64, float64, and time.Duration; untagged and decree:"-" fields are skipped.

Test plan

  • go test ./... passes in sdk/contrib/envconfig
  • All field types populated correctly in integration test

Closes #16

@zeevdr zeevdr added enhancement New feature or request sdk SDK changes size: L Larger effort — multiple days, design decisions needed priority: P2 Nice-to-have labels Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zeevdr zeevdr force-pushed the feat/16-contrib-envconfig branch from 383895b to 4ea7109 Compare June 5, 2026 04:33
@zeevdr zeevdr merged commit 78a0d56 into main Jun 5, 2026
21 checks passed
@zeevdr zeevdr deleted the feat/16-contrib-envconfig branch June 5, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: P2 Nice-to-have sdk SDK changes size: L Larger effort — multiple days, design decisions needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contrib/envconfig: struct field adapter

1 participant