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
Package vars like the one you demonstrated cause this linter to error because they're a vector to side-effects either when the package modifies the value or an external package does.
I assume you're asking because you're trying to define a package level variable for this.
Activity
[-]Should default struct initializers be excluded?[/-][+]Should default struct literals be excluded?[/+]leighmcculloch commentedon Apr 12, 2021
Package vars like the one you demonstrated cause this linter to error because they're a vector to side-effects either when the package modifies the value or an external package does.
I assume you're asking because you're trying to define a package level variable for this.
Instead define a function that returns the value.