heetch / heetch/confita

backend/flag: error when config is partial

Open
#63 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
507
Forks
49
PR merge metrics
No merged PRs in 30d

Description

With confita, it's usual to use Load on a struct which doesn't contain all the possible configuration information. For example, we might require information on just the configuration required by a single component.

Unfortunately this does not work well with the flags backend, because it's not possible to parse command line flags correctly without knowing all the possible flags.

This code demonstrates the issue: https://play.golang.org/p/rxws8K5Noxb

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Go playground reproduction and inspect how confita's flags backend handles Load when the target struct contains only partial configuration. Trace how command-line flags are parsed without the complete set of possible flags. Done means loading a partial configuration struct works correctly with the flags backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.