(addr string)
| 237 | } |
| 238 | |
| 239 | func resolveIPPAndPort(addr string) (string, error) { |
| 240 | host, port, err := net.SplitHostPort(addr) |
| 241 | if err != nil { |
| 242 | return "", err |
| 243 | } |
| 244 | |
| 245 | ip, err := resolveIP(host) |
| 246 | if err != nil { |
| 247 | return "", err |
| 248 | } |
| 249 | return net.JoinHostPort(ip.String(), port), nil |
| 250 | } |
| 251 | |
| 252 | // ParseInterface parses the [Interface] section and extract the information into `device` |
| 253 | func ParseInterface(cfg *ini.File, device *DeviceConfig) error { |
no test coverage detected