You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
It will be great to have option - mode: strict or loose. Strict mode is how it works now. In loose mode only check fields that is really dangerous to have not initialized. By dangerous I mean types that will cause errors on access to it:
type Some struct {
Counter int // it's ok not to init this (in loose mode)
Lock sync.Mutex // it's ok
Slice []int // it's ok
Map map[int]int // it's not ok - writing to not initialized map panics
Cond *sync.Cond // it's not ok - access to not initialized pointer will panic
W io.Writer // it's not ok - access to not initialized interface will panic
Chan chan int // it's not ok - writing to not initialized chan will hang
}
The text was updated successfully, but these errors were encountered:
hummerd
changed the title
Feature Request: Find fields that was never assigned
Feature Request: Strict and loose mode
Mar 26, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It will be great to have option - mode: strict or loose. Strict mode is how it works now. In loose mode only check fields that is really dangerous to have not initialized. By dangerous I mean types that will cause errors on access to it:
The text was updated successfully, but these errors were encountered: