Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Sep 11, 2023
1 parent 0f7187a commit 477a7bf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/oras/internal/option/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ func (opts *Remote) ApplyFlagsWithPrefix(fs *pflag.FlagSet, prefix, description
plainHTTPFlagName := flagPrefix + "plain-http"
plainHTTP := *fs.Bool(plainHTTPFlagName, false, "allow insecure connections to "+notePrefix+"registry without SSL check")
opts.plainHTTP = func() (bool, bool) {
if !fs.Changed(plainHTTPFlagName) {
return plainHTTP, false
}
return plainHTTP, true
return plainHTTP, fs.Changed(plainHTTPFlagName)
}
fs.StringVarP(&opts.CACertFilePath, flagPrefix+"ca-file", "", "", "server certificate authority file for the remote "+notePrefix+"registry")
fs.StringArrayVarP(&opts.resolveFlag, flagPrefix+"resolve", "", nil, "customized DNS for "+notePrefix+"registry, formatted in `host:port:address[:address_port]`")
Expand Down

0 comments on commit 477a7bf

Please sign in to comment.