open-feature / open-feature/cli
Add new field "accessor" to schema
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 63
- Forks
- 22
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 19
Description
The name/key of the flag does not always make for a good variable name. Allow the user to optionally specify what the generated variable name should be for a flag using an "accessor" field in the flag manifest. An example is the hypothetical flag named "enable-api". In Go, this will generate a variable called EnableApi, which does not follow Go's initialism conventions: I would want to name it EnableAPI instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the flag manifest is parsed and how the generated name reaches internal/generators/golang/golang.tmpl. Add support for the optional accessor field so enable-api can generate EnableAPI instead of EnableApi. Confirm the generated Go output uses the accessor when provided and preserves existing naming when it is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100