diff --git a/pkg/meshdb/networking/networking.go b/pkg/meshdb/networking/networking.go index 33a33c0a9..c18987655 100644 --- a/pkg/meshdb/networking/networking.go +++ b/pkg/meshdb/networking/networking.go @@ -154,7 +154,7 @@ func (n *networking) DeleteNetworkACL(ctx context.Context, name string) error { // ListNetworkACLs returns a list of NetworkACLs. func (n *networking) ListNetworkACLs(ctx context.Context) (ACLs, error) { out := make(ACLs, 0) - err := n.IterPrefix(ctx, NetworkACLsPrefix, func(key, value string) error { + err := n.IterPrefix(ctx, NetworkACLsPrefix, func(_, value string) error { acl := &v1.NetworkACL{} err := protojson.Unmarshal([]byte(value), acl) if err != nil { @@ -250,7 +250,7 @@ func (n *networking) DeleteRoute(ctx context.Context, name string) error { // ListRoutes returns a list of Routes. func (n *networking) ListRoutes(ctx context.Context) ([]*v1.Route, error) { out := make([]*v1.Route, 0) - err := n.IterPrefix(ctx, RoutesPrefix, func(key, value string) error { + err := n.IterPrefix(ctx, RoutesPrefix, func(_, value string) error { route := &v1.Route{} err := protojson.Unmarshal([]byte(value), route) if err != nil { diff --git a/pkg/meshdb/peers/graph.go b/pkg/meshdb/peers/graph.go index 8c25951ab..3cdd3499a 100644 --- a/pkg/meshdb/peers/graph.go +++ b/pkg/meshdb/peers/graph.go @@ -284,7 +284,7 @@ func (g *GraphStore) Edge(sourceNode, targetNode string) (graph.Edge[string], er // ListEdges should return all edges in the graph in a slice. func (g *GraphStore) ListEdges() ([]graph.Edge[string], error) { edges := make([]graph.Edge[string], 0) - err := g.IterPrefix(context.Background(), EdgesPrefix, func(key, value string) error { + err := g.IterPrefix(context.Background(), EdgesPrefix, func(_, value string) error { var edge Edge err := json.Unmarshal([]byte(value), &edge) if err != nil { diff --git a/pkg/meshdb/peers/peers.go b/pkg/meshdb/peers/peers.go index e1fe93e02..8d4e2db18 100644 --- a/pkg/meshdb/peers/peers.go +++ b/pkg/meshdb/peers/peers.go @@ -207,7 +207,7 @@ func (p *peers) Delete(ctx context.Context, id string) error { func (p *peers) List(ctx context.Context) ([]Node, error) { out := make([]Node, 0) - err := p.db.IterPrefix(ctx, NodesPrefix, func(key, value string) error { + err := p.db.IterPrefix(ctx, NodesPrefix, func(_, value string) error { var node Node err := json.Unmarshal([]byte(value), &node) if err != nil { diff --git a/pkg/meshdb/rbac/rbac.go b/pkg/meshdb/rbac/rbac.go index 2bcff18ae..42b9b12e8 100644 --- a/pkg/meshdb/rbac/rbac.go +++ b/pkg/meshdb/rbac/rbac.go @@ -185,7 +185,7 @@ func (r *rbac) DeleteRole(ctx context.Context, name string) error { // ListRoles returns a list of all roles. func (r *rbac) ListRoles(ctx context.Context) (RolesList, error) { out := make(RolesList, 0) - err := r.IterPrefix(ctx, rolesPrefix, func(key, value string) error { + err := r.IterPrefix(ctx, rolesPrefix, func(_, value string) error { role := &v1.Role{} err := protojson.Unmarshal([]byte(value), role) if err != nil { @@ -264,7 +264,7 @@ func (r *rbac) DeleteRoleBinding(ctx context.Context, name string) error { // ListRoleBindings returns a list of all rolebindings. func (r *rbac) ListRoleBindings(ctx context.Context) ([]*v1.RoleBinding, error) { out := make([]*v1.RoleBinding, 0) - err := r.IterPrefix(ctx, rolebindingsPrefix, func(key, value string) error { + err := r.IterPrefix(ctx, rolebindingsPrefix, func(_, value string) error { rolebinding := &v1.RoleBinding{} err := protojson.Unmarshal([]byte(value), rolebinding) if err != nil { @@ -330,7 +330,7 @@ func (r *rbac) DeleteGroup(ctx context.Context, name string) error { // ListGroups returns a list of all groups. func (r *rbac) ListGroups(ctx context.Context) ([]*v1.Group, error) { out := make([]*v1.Group, 0) - err := r.IterPrefix(ctx, groupsPrefix, func(key, value string) error { + err := r.IterPrefix(ctx, groupsPrefix, func(_, value string) error { group := &v1.Group{} err := protojson.Unmarshal([]byte(value), group) if err != nil { diff --git a/pkg/plugins/manager.go b/pkg/plugins/manager.go index cc4f52bd6..aa39f435b 100644 --- a/pkg/plugins/manager.go +++ b/pkg/plugins/manager.go @@ -85,7 +85,7 @@ func (m *manager) HasWatchers() bool { // AuthUnaryInterceptor returns a unary interceptor for the configured auth plugin. // If no plugin is configured, the returned function is a no-op. func (m *manager) AuthUnaryInterceptor() grpc.UnaryServerInterceptor { - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + return func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { if m.auth == nil { return handler(ctx, req) } @@ -103,7 +103,7 @@ func (m *manager) AuthUnaryInterceptor() grpc.UnaryServerInterceptor { // AuthStreamInterceptor returns a stream interceptor for the configured auth plugin. // If no plugin is configured, the returned function is a no-op. func (m *manager) AuthStreamInterceptor() grpc.StreamServerInterceptor { - return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + return func(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error { if m.auth == nil { return handler(srv, ss) }