Skip to content

Commit

Permalink
Merge pull request #1 from skpr/lint
Browse files Browse the repository at this point in the history
Fix lint
  • Loading branch information
nickschuch authored Nov 26, 2024
2 parents 5e34a9a + 993605d commit 596934b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/skpr-k8s-mutate-nodeselector/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package main is the entrypoint for our program.
package main

import (
Expand Down Expand Up @@ -44,7 +45,7 @@ func main() {
Short: "Run the mutating webhook server",
Long: cmdLong,
Example: cmdExample,
RunE: func(cmd *cobra.Command, _ []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{}))

logger.Info("Starting server")
Expand Down
2 changes: 2 additions & 0 deletions internal/mutator/handler.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package mutator for handling mutation requests.
package mutator

import (
Expand All @@ -17,6 +18,7 @@ import (
// Annotation used to declare where a Pod should be scheduled.
const annotation = "k8s-mutate-nodeselector.skpr.io/namespace"

// Handler for responding to mutation requests.
type Handler struct {
logger *slog.Logger
client clientcorev1.NamespaceInterface
Expand Down
2 changes: 1 addition & 1 deletion internal/mutator/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type MockNamespaceClient struct {
}

// Get a mock response of namespace and error.
func (m *MockNamespaceClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Namespace, error) {
func (m *MockNamespaceClient) Get(_ context.Context, _ string, _ metav1.GetOptions) (*corev1.Namespace, error) {
return m.Namespace, m.Error
}

Expand Down

0 comments on commit 596934b

Please sign in to comment.