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
When defining default values, it normally makes no sense to make them mutable. Global default values should either be defined as constants, or be well documented, if there are use cases to globally change the default behavior.
Maybe adding a function in config.go, that creates a new default instance and removing the const block in rety.go would be a better approach here?
Hi, @Noroth, I agree exported variables aren't nice. I don't know why I choose this way. Maybe because to the const isn't possible to set function? Or I don't know, and it doesn't matter. I like your idea of NewWithDefaults, and it looks for me like goish way how to do it. I will do it, or PR is really welcome.
When defining default values, it normally makes no sense to make them mutable. Global default values should either be defined as constants, or be well documented, if there are use cases to globally change the default behavior.
Maybe adding a function in
config.go
, that creates a new default instance and removing the const block inrety.go
would be a better approach here?The text was updated successfully, but these errors were encountered: