zeroshade commented on code in PR #899:
URL: https://github.com/apache/iceberg-go/pull/899#discussion_r3082434426
##########
cmd/iceberg/main.go:
##########
@@ -153,9 +153,21 @@ func main() {
log.Fatal(err)
}
+ // Determine which flags were explicitly supplied on the command line so
+ // that mergeConf can apply file-config values only for flags that were
+ // not explicitly provided (i.e. still at their docopt default).
+ explicitFlags := make(map[string]bool)
+ for _, arg := range os.Args[1:] {
+ if strings.HasPrefix(arg, "--") {
+ // --flag=value or --flag (bare boolean)
+ name := strings.SplitN(strings.TrimPrefix(arg, "--"),
"=", 2)[0]
+ explicitFlags[name] = true
+ }
+ }
+
Review Comment:
rebase from main, i've merged the PR that this was from :smile:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]