This repository was archived by the owner on Dec 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/mbilski/exhaustivestruct )] ( https://goreportcard.com/badge/github.com/mbilski/exhaustivestruct )
4
4
5
- exhaustivestruct is a go static analysis tool to find structs that have some, but no all, initialized fields.
5
+ exhaustivestruct is a go static analysis tool to find structs that have uninitialized fields.
6
6
7
7
> :warning : This linter is meant to be used only for special cases.
8
8
> It is not recommended to use it for all files in a project.
@@ -16,7 +16,11 @@ go get -u github.com/mbilski/exhaustivestruct/cmd/exhaustivestruct
16
16
## Usage
17
17
18
18
```
19
- exhaustivestruct files/packages
19
+ Usage: exhaustivestruct [-flag] [package]
20
+
21
+ Flags:
22
+ -struct_patterns string
23
+ This is a comma separated list of expressions to match struct packages and names
20
24
```
21
25
22
26
## Example
@@ -30,7 +34,5 @@ type User struct {
30
34
var user = User { // fails with "Age is missing in User"
31
35
Name : " John" ,
32
36
}
33
-
34
- var user2 = User {} // ignores empty structs
35
37
```
36
38
You can’t perform that action at this time.
0 commit comments