From 0a673fa5ef5082a69ce8f4a64928010b5a21c3d4 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 25 Oct 2017 17:10:15 -0400 Subject: [PATCH] use svchost.IsValid for FriendlyHost.Valid --- registry/regsrc/friendly_host.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/registry/regsrc/friendly_host.go b/registry/regsrc/friendly_host.go index da93cdfd2..648e2a193 100644 --- a/registry/regsrc/friendly_host.go +++ b/registry/regsrc/friendly_host.go @@ -95,16 +95,7 @@ func ParseFriendlyHost(source string) (host *FriendlyHost, rest string) { // name specifications. Not that IDN prefixes containing punycode are not valid // input which we expect to always be in user-input or normalised display form. func (h *FriendlyHost) Valid() bool { - if h.Display() == InvalidHostString { - return false - } - if h.Normalized() == InvalidHostString { - return false - } - if containsPuny(h.Raw) { - return false - } - return true + return svchost.IsValid(h.Raw) } // Display returns the host formatted for display to the user in CLI or web