-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added Default logic to publish #2677
Conversation
return | ||
} | ||
verif, _, _ := req.Option("resolve").Bool() | ||
popts.verifyExists = verif |
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.
popts.verifyExists, _, _ := req.Option("resolve").Bool()
?
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.
Yeah, I was wrong. Removed that commend after little longer thinking.
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.
Well, actually - it may be smart to only set it to verif if it is found. The logic is slightly different, this way.
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.
Does it make any difference? It is by default true, you can change it only by doing --verify=false
.
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.
I think what @RichardLitt proposed in his first comment is best, except use =
instead of :=
since we're not declaring any new variables.
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.
and then we can also change the popts declaration to just:
popts := new(publishOpts)
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.
Done.
Part of #2484 License: MIT Signed-off-by: Richard Littauer <[email protected]>
a4f1f71
to
475d730
Compare
Part of #2484
License: MIT
Signed-off-by: Richard Littauer [email protected]