Open
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