-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
overwrite default Options from SuperFlag string #1663
Conversation
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.
Got a comment about adding a test with a legit value for super flag.
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jarifibrahim and @karlmcguire)
options_test.go, line 12 at r1 (raw file):
func TestOptions(t *testing.T) { // copy all the default options over to a big SuperFlag string defaultSuperFlag := generateSuperFlag(DefaultOptions(""))
would be good to try to overwrite some option, to capture the most common use case.
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.
@aman-bansal -- Can you resolve this and get it merged today?
Reviewable status: 2 of 4 files reviewed, 3 unresolved discussions (waiting on @jarifibrahim, @karlmcguire, and @manishrjain)
options.go, line 192 at r2 (raw file):
// // Unsupported: Options.Logger, Options.EncryptionKey func SetSuperFlag(superflag string, options Options) Options {
(Options) WithSuperFlag(superflag string) Options {
...
}
options_test.go, line 1 at r2 (raw file):
package badger
license here.
(This relates to DGRAPH-3003 and is blocked by dgraph-io/ristretto#247.)
overwriteOptions
I only look at scalar, non-interface fields. I figured people could just useWithLogger
andWithEncryptionKey
instead of trying to accommodate it in SuperFlag.Dir
andValueDir
which previously didn't really have a default value?This change is