Skip to content
Discussion options

You must be logged in to vote

After a few trial and error, I came up with that solution.

Let me know if this is the way to do or if I did it completely wrong.

import (
	"fmt"
	"strconv"
	"strings"

	"github.com/alecthomas/kong"
)

// Set stores per-module configuration overrides.
//
// The first-level map key is the module name.
// The second-level map contains the module options, where each key/value pair
// represents a configuration entry for that module.
//
// Values are parsed from CLI arguments and automatically converted to native
// Go types when possible (int64, float64, bool). When no conversion applies,
// the value is stored as a string.
//
// Example usage:
//
//	--set sqlite.database=/path/to/file.sqlite
/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by alecthomas
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #572 on January 21, 2026 02:37.