diff options
Diffstat (limited to 'sign_request.go')
-rw-r--r-- | sign_request.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sign_request.go b/sign_request.go index 2f7dd7b..dfb9f9f 100644 --- a/sign_request.go +++ b/sign_request.go @@ -79,10 +79,14 @@ func parse_sign_flags() SignFlags { fs.Parse(os.Args[2:]) // convert array flags to config structs - flags.DNSNames = COMMA_SPLIT.Split(dns_names, -1) - tmp_ips := COMMA_SPLIT.Split(ips, -1) - for _, sip := range tmp_ips { - flags.IPAddresses = append(flags.IPAddresses, net.ParseIP(sip)) + if dns_names != "" { + flags.DNSNames = COMMA_SPLIT.Split(dns_names, -1) + } + if ips != "" { + tmp_ips := COMMA_SPLIT.Split(ips, -1) + for _, sip := range tmp_ips { + flags.IPAddresses = append(flags.IPAddresses, net.ParseIP(sip)) + } } container_type := reflect.ValueOf(container) |