Skip to content

docs: exhaustivestruct example explanation #1985

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

Merged
merged 1 commit into from
May 15, 2021
Merged
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
8 changes: 5 additions & 3 deletions .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ linters-settings:
default-signifies-exhaustive: false

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

forbidigo:
# Forbid the following identifiers
Expand Down