abhinav / abhinav/requiredfield

Required by default, granular opt-in/out

未關閉
#4 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
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 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。