Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix revive linter warnings #44

Merged
merged 1 commit into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/egress-eddie/seccomp.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ var networkSyscalls = seccomp.SyscallRules{

type nullEmitter struct{}

func (nullEmitter) Emit(depth int, level log.Level, timestamp time.Time, format string, v ...interface{}) {
func (nullEmitter) Emit(_ int, _ log.Level, _ time.Time, _ string, _ ...interface{}) {
}

func installSeccompFilters(logger *zap.Logger, needsNetworking bool) (int, error) {
Expand Down
4 changes: 2 additions & 2 deletions mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func initMockEnforcers() {
mockEnforcers = make(map[uint16]*mockEnforcer)
}

func newMockEnforcer(_ context.Context, _ *zap.Logger, queueNum uint16, ipv6 bool, hook nfqueue.HookFunc) (enforcer, error) {
func newMockEnforcer(_ context.Context, _ *zap.Logger, queueNum uint16, _ bool, hook nfqueue.HookFunc) (enforcer, error) {
if _, ok := mockEnforcers[queueNum]; ok {
return nil, fmt.Errorf("a nfqueue with the queue number %d has already been started", queueNum)
}
Expand Down Expand Up @@ -77,7 +77,7 @@ func (m *mockResolver) LookupNetIP(_ context.Context, _ string, host string) ([]
return nil, &net.DNSError{IsNotFound: true}
}

func (m *mockResolver) LookupAddr(ctx context.Context, addr string) ([]string, error) {
func (m *mockResolver) LookupAddr(_ context.Context, addr string) ([]string, error) {
if m.hostnames == nil {
return nil, &net.DNSError{IsNotFound: true}
}
Expand Down