abhinav / abhinav/requiredfield
Required by default, granular opt-in/out
未關閉
enhancement
- 主要語言
- Go
- 星號
- 34
- 分支
- 4
- 平均合併
- 5 分鐘
- 30 天內合併 PR
- 2
描述
There are frequent cases where "field is required" is the default, and optional is the exception.
e.g. there are a fair number of instances of `// optional [desc]` in the Go source itself.
There should be a way to opt into "required by default" at a package level.
This wouldn't be a global default for this because it would have far too many false positives.
With package-level opt-in, we'll inevitably need struct-level opt-out, so this issue is also for granular required/optional opt-in for structs or packages.
貢獻指南
評估
這個 Issue 還沒有評估資料。