diff options
author | Simon Rozman <simon@rozman.si> | 2019-05-16 10:34:09 +0200 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2019-05-16 10:36:28 +0200 |
commit | 7bd3dccd7a7eed1b31d46570b4c6d2e95ec2a7c6 (patch) | |
tree | a65c6f4208cde882003109437158456f3e712405 /conf/writer.go | |
parent | firewall: allow wireguard.exe to override other rules (diff) | |
download | wireguard-windows-7bd3dccd7a7eed1b31d46570b4c6d2e95ec2a7c6.tar.xz wireguard-windows-7bd3dccd7a7eed1b31d46570b4c6d2e95ec2a7c6.zip |
global: change acronyms to uppercase
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to '')
-rw-r--r-- | conf/writer.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/conf/writer.go b/conf/writer.go index ccc3024b..748c1d61 100644 --- a/conf/writer.go +++ b/conf/writer.go @@ -28,16 +28,16 @@ func (conf *Config) ToWgQuick() string { output.WriteString(fmt.Sprintf("Address = %s\n", strings.Join(addrStrings[:], ", "))) } - if len(conf.Interface.Dns) > 0 { - addrStrings := make([]string, len(conf.Interface.Dns)) - for i, address := range conf.Interface.Dns { + if len(conf.Interface.DNS) > 0 { + addrStrings := make([]string, len(conf.Interface.DNS)) + for i, address := range conf.Interface.DNS { addrStrings[i] = address.String() } output.WriteString(fmt.Sprintf("DNS = %s\n", strings.Join(addrStrings[:], ", "))) } - if conf.Interface.Mtu > 0 { - output.WriteString(fmt.Sprintf("MTU = %d\n", conf.Interface.Mtu)) + if conf.Interface.MTU > 0 { + output.WriteString(fmt.Sprintf("MTU = %d\n", conf.Interface.MTU)) } for _, peer := range conf.Peers { @@ -88,12 +88,12 @@ func (conf *Config) ToUAPI() (uapi string, dnsErr error) { } if !peer.Endpoint.IsEmpty() { - var resolvedIp string - resolvedIp, dnsErr = resolveHostname(peer.Endpoint.Host) + var resolvedIP string + resolvedIP, dnsErr = resolveHostname(peer.Endpoint.Host) if dnsErr != nil { return } - resolvedEndpoint := Endpoint{resolvedIp, peer.Endpoint.Port} + resolvedEndpoint := Endpoint{resolvedIP, peer.Endpoint.Port} output.WriteString(fmt.Sprintf("endpoint=%s\n", resolvedEndpoint.String())) } |