Skip to content

Commit

Permalink
fix(config): print log when gettype is unknown (jeessy2#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaterLemons2k authored Jun 2, 2023
1 parent 6151c3b commit 412777b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,10 @@ func (conf *DnsConfig) GetIpv4Addr() string {
case "cmd":
// 从命令行获取 IP
return conf.getAddrFromCmd("IPv4")
default:
log.Println("IPv4 的 获取 IP 方式 未知!")
return "" // unknown type
}
return "" // unknown type
}

func (conf *DnsConfig) getIpv6AddrFromInterface() string {
Expand Down Expand Up @@ -352,6 +354,8 @@ func (conf *DnsConfig) GetIpv6Addr() (result string) {
case "cmd":
// 从命令行获取 IP
return conf.getAddrFromCmd("IPv6")
default:
log.Println("IPv6 的 获取 IP 方式 未知!")
return "" // unknown type
}
return "" // unknown type
}

0 comments on commit 412777b

Please sign in to comment.