-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not
Description
Your feature request related to a problem? Please describe.
The vischeck
linter ensures certain visibility rules have been adhered to.
package main
type MyStruct struct {
Name string `visibility:"readonly"`
Age int `visibility:"readonly"`
}
func main() {
s := MyStruct{}
s.Name = "Frank" // misuse of readonly field: cannot assign
_ = &s.Name // misuse of readonly field: cannot take address
s.Age++ // misuse of readonly field: cannot increment
}
https://github.com/johnfrankmorgan/vischeck
Describe the solution you'd like.
—
Describe alternatives you've considered.
—
Additional context.
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not