Skip to content

Commit 42a3299

Browse files
authored
docs: exhaustivestruct example explanation (#1985)
1 parent 20b6515 commit 42a3299

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.golangci.example.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,13 @@ linters-settings:
134134
default-signifies-exhaustive: false
135135

136136
exhaustivestruct:
137+
# Struct Patterns is list of expressions to match struct packages and names
138+
# The struct packages have the form example.com/package.ExampleStruct
139+
# The matching patterns can use matching syntax from https://pkg.go.dev/path#Match
140+
# If this list is empty, all structs are tested.
137141
struct-patterns:
138142
- '*.Test'
139-
- '*.Test2'
140-
- '*.Embedded'
141-
- '*.External'
143+
- 'example.com/package.ExampleStruct'
142144

143145
forbidigo:
144146
# Forbid the following identifiers

0 commit comments

Comments
 (0)