From b5a50655ded48238a7effb823345e529068785b3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 10 Jan 2025 12:46:26 +0100 Subject: [PATCH] Go fixes --- dnscrypt-proxy/fuzzing_test.go | 1 - dnscrypt-proxy/netprobe_others.go | 1 - dnscrypt-proxy/plugin_forward.go | 2 +- dnscrypt-proxy/privilege_others.go | 1 - dnscrypt-proxy/service_android.go | 1 - dnscrypt-proxy/service_linux.go | 1 - dnscrypt-proxy/service_others.go | 1 - dnscrypt-proxy/setsockopts_others.go | 1 - dnscrypt-proxy/systemd_free.go | 1 - dnscrypt-proxy/systemd_linux.go | 1 - dnscrypt-proxy/timezone_others.go | 1 - 11 files changed, 1 insertion(+), 11 deletions(-) diff --git a/dnscrypt-proxy/fuzzing_test.go b/dnscrypt-proxy/fuzzing_test.go index 0cdf3965..fa3e9bbe 100644 --- a/dnscrypt-proxy/fuzzing_test.go +++ b/dnscrypt-proxy/fuzzing_test.go @@ -1,5 +1,4 @@ //go:build gofuzzbeta -// +build gofuzzbeta package main diff --git a/dnscrypt-proxy/netprobe_others.go b/dnscrypt-proxy/netprobe_others.go index 1745b46f..1ed493ab 100644 --- a/dnscrypt-proxy/netprobe_others.go +++ b/dnscrypt-proxy/netprobe_others.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package main diff --git a/dnscrypt-proxy/plugin_forward.go b/dnscrypt-proxy/plugin_forward.go index d5d91cc1..a35e4c3a 100644 --- a/dnscrypt-proxy/plugin_forward.go +++ b/dnscrypt-proxy/plugin_forward.go @@ -172,7 +172,7 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro } var err error var respMsg *dns.Msg - var tries = 4 + tries := 4 for _, item := range sequence { var server string switch item.typ { diff --git a/dnscrypt-proxy/privilege_others.go b/dnscrypt-proxy/privilege_others.go index 195aa1ce..b4780787 100644 --- a/dnscrypt-proxy/privilege_others.go +++ b/dnscrypt-proxy/privilege_others.go @@ -1,5 +1,4 @@ //go:build !windows && !linux -// +build !windows,!linux package main diff --git a/dnscrypt-proxy/service_android.go b/dnscrypt-proxy/service_android.go index 3a73dcc8..d320035f 100644 --- a/dnscrypt-proxy/service_android.go +++ b/dnscrypt-proxy/service_android.go @@ -1,5 +1,4 @@ //go:build android -// +build android package main diff --git a/dnscrypt-proxy/service_linux.go b/dnscrypt-proxy/service_linux.go index 878a56ae..eef61a83 100644 --- a/dnscrypt-proxy/service_linux.go +++ b/dnscrypt-proxy/service_linux.go @@ -1,5 +1,4 @@ //go:build !android -// +build !android package main diff --git a/dnscrypt-proxy/service_others.go b/dnscrypt-proxy/service_others.go index 38935794..c360b8db 100644 --- a/dnscrypt-proxy/service_others.go +++ b/dnscrypt-proxy/service_others.go @@ -1,5 +1,4 @@ //go:build !linux && !windows -// +build !linux,!windows package main diff --git a/dnscrypt-proxy/setsockopts_others.go b/dnscrypt-proxy/setsockopts_others.go index 9bc119e6..da8cedfe 100644 --- a/dnscrypt-proxy/setsockopts_others.go +++ b/dnscrypt-proxy/setsockopts_others.go @@ -1,5 +1,4 @@ //go:build !freebsd && !openbsd && !windows && !darwin && !linux -// +build !freebsd,!openbsd,!windows,!darwin,!linux package main diff --git a/dnscrypt-proxy/systemd_free.go b/dnscrypt-proxy/systemd_free.go index 79e8838e..6dce7503 100644 --- a/dnscrypt-proxy/systemd_free.go +++ b/dnscrypt-proxy/systemd_free.go @@ -1,5 +1,4 @@ //go:build !linux -// +build !linux package main diff --git a/dnscrypt-proxy/systemd_linux.go b/dnscrypt-proxy/systemd_linux.go index 14d37dcc..06e2307e 100644 --- a/dnscrypt-proxy/systemd_linux.go +++ b/dnscrypt-proxy/systemd_linux.go @@ -1,5 +1,4 @@ //go:build !android -// +build !android package main diff --git a/dnscrypt-proxy/timezone_others.go b/dnscrypt-proxy/timezone_others.go index 5c26e855..90bee490 100644 --- a/dnscrypt-proxy/timezone_others.go +++ b/dnscrypt-proxy/timezone_others.go @@ -1,5 +1,4 @@ //go:build !android -// +build !android package main