mirror of
https://github.com/containers/image.git
synced 2025-04-18 19:44:05 +03:00
Fix "QF1001: could apply De Morgan's law"
Should not change behavior Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
cb71b8dc79
commit
4d10eba5de
@ -920,7 +920,7 @@ func tlsCacheGet(config *restConfig) (http.RoundTripper, error) {
|
||||
// TLSConfigFor returns a tls.Config that will provide the transport level security defined
|
||||
// by the provided Config. Will return nil if no transport level security is requested.
|
||||
func tlsConfigFor(c *restConfig) (*tls.Config, error) {
|
||||
if !(c.HasCA() || c.HasCertAuth() || c.Insecure) {
|
||||
if !c.HasCA() && !c.HasCertAuth() && !c.Insecure {
|
||||
return nil, nil
|
||||
}
|
||||
if c.HasCA() && c.Insecure {
|
||||
|
@ -235,7 +235,7 @@ func parseShortNameValue(alias string) (reference.Named, error) {
|
||||
}
|
||||
|
||||
registry := reference.Domain(named)
|
||||
if !(strings.ContainsAny(registry, ".:") || registry == "localhost") {
|
||||
if !strings.ContainsAny(registry, ".:") && registry != "localhost" {
|
||||
return nil, fmt.Errorf("invalid alias %q: must contain registry and repository", alias)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user