Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiger committed Aug 29, 2024
1 parent 7ca8165 commit 478a990
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/clusterwidenetworkpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ func (r *ClusterwideNetworkPolicyReconciler) manageDNSProxy(

// If proxy is ON, update DNS address(if it's set in spec)
if r.DnsProxy != nil && f.Spec.DNSServerAddress != "" {
port := 53
port := uint(53)
if f.Spec.DNSPort != nil {
port = int(*f.Spec.DNSPort)
port = *f.Spec.DNSPort
}
addr := fmt.Sprintf("%s:%d", f.Spec.DNSServerAddress, port)
if err = r.DnsProxy.UpdateDNSServerAddr(addr); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/dnsproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func bindToPort(host string, port uint, log logr.Logger) (*net.UDPConn, *net.TCP
var listener net.Listener
var conn net.PacketConn

bindAddr := net.JoinHostPort(host, strconv.Itoa(int(port)))
bindAddr := net.JoinHostPort(host, strconv.FormatUint(uint64(port), 10))

defer func() {
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nftables/firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func init() {
// or to run only the integration test go test Integration
func TestFirewallValidateRulesIntegration(t *testing.T) {
if os.Getegid() != 0 {
t.Skipf(color.YellowString("skipping integration test because not root"))
t.Skipf(color.YellowString("skipping integration test because not root")) //nolint:govet

Check failure on line 22 in pkg/nftables/firewall_test.go

View workflow job for this annotation

GitHub Actions / Build

SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
}

type fields struct {
Expand Down

0 comments on commit 478a990

Please sign in to comment.