Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrabovcin committed May 16, 2023
1 parent b8a5c2f commit 9bd2406
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,8 @@ issues:
include:
- EXC0012
- EXC0014
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gochecknoglobals
4 changes: 2 additions & 2 deletions pkg/rewriter/conditional.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type conditionalRewriter struct {

var _ ResourceRewriter = (*conditionalRewriter)(nil)

// When executes provided rewriter only if condition matches
// When executes provided rewriter only if condition matches.
func When(condition Condition, rewriter ResourceRewriter) ResourceRewriter {
return &conditionalRewriter{
rewriter: rewriter,
Expand All @@ -37,7 +37,7 @@ func (r *conditionalRewriter) BeforeServing(u *unstructured.Unstructured) error
// Condition is function that returns bool with condition match result.
type Condition func(*unstructured.Unstructured) bool

// MatchGVK checks if resource matches given GroupVersionKind
// MatchGVK checks if resource matches given GroupVersionKind.
func MatchGVK(gvk schema.GroupVersionKind) Condition {
return func(u *unstructured.Unstructured) bool {
apiVersion, kind := gvk.ToAPIVersionAndKind()
Expand Down

0 comments on commit 9bd2406

Please sign in to comment.