aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/firewall/helpers.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-16 15:49:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-16 15:49:18 +0200
commitf10997a8df91be1a9a4fd10f0d761924d772cd81 (patch)
tree8eff8a92b1966f1934ab321bc1a5a060f7a6fd71 /service/firewall/helpers.go
parentservice: use more upstream constants (diff)
downloadwireguard-windows-f10997a8df91be1a9a4fd10f0d761924d772cd81.tar.xz
wireguard-windows-f10997a8df91be1a9a4fd10f0d761924d772cd81.zip
global: correct names and patterns for go lint
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'service/firewall/helpers.go')
-rw-r--r--service/firewall/helpers.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/service/firewall/helpers.go b/service/firewall/helpers.go
index c9968660..e340b802 100644
--- a/service/firewall/helpers.go
+++ b/service/firewall/helpers.go
@@ -67,9 +67,8 @@ func wrapErr(err error) error {
_, file, line, ok := runtime.Caller(1)
if !ok {
return fmt.Errorf("Firewall error at unknown location: %v", err)
- } else {
- return fmt.Errorf("Firewall error at %s:%d: %v", file, line, err)
}
+ return fmt.Errorf("Firewall error at %s:%d: %v", file, line, err)
}
func getCurrentProcessSecurityDescriptor() (*wtFwpByteBlob, error) {
@@ -86,7 +85,7 @@ func getCurrentProcessSecurityDescriptor() (*wtFwpByteBlob, error) {
return blob, nil
}
-func getCurrentProcessAppId() (*wtFwpByteBlob, error) {
+func getCurrentProcessAppID() (*wtFwpByteBlob, error) {
currentFile, err := os.Executable()
if err != nil {
return nil, wrapErr(err)
@@ -97,10 +96,10 @@ func getCurrentProcessAppId() (*wtFwpByteBlob, error) {
return nil, wrapErr(err)
}
- var appId *wtFwpByteBlob
- err = fwpmGetAppIdFromFileName0(curFilePtr, unsafe.Pointer(&appId))
+ var appID *wtFwpByteBlob
+ err = fwpmGetAppIdFromFileName0(curFilePtr, unsafe.Pointer(&appID))
if err != nil {
return nil, wrapErr(err)
}
- return appId, nil
+ return appID, nil
}