-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config File Handling #156
Config File Handling #156
Conversation
if err := args.Bind(&cfg); err != nil { | ||
log.Fatal(err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we probably add an option to specify the config file if they want something other than the default .iceberg-go.yaml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeroshade I have added --config option to specify the path to the configuration file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!!
@alex-kar can you please rebase and fix the merge conflict? |
@nastra Rebased onto the latest |
Handle config file
.iceberg-go.yaml
in the home directory.Closes #62
@zeroshade I noticed that
--catalog
has different functionality compare to pyiceberg cli, where it defines catalog name to be loaded from configuration file.iceberg-go -
--catalog
- catalog type.pyiceberg
--catalog
- catalog name to load from configuration file.Because of this reason, currently it can load only
default
catalog.Another note is that
docopt
throw's exception when struct has some non default values.docopt/docopt.go#55
Because of this limitation, I can't first parse configuration file and then provide the same struct to
docopt
to ensure the correct precedence. instead I added this manual mapping: