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 was archived by the owner on Jun 9, 2025. It is now read-only.
It may worth expanding https://containersolutions.github.io/runbooks/posts/golang/assignment-to-entry-in-nil-map/ with a case when map is a part of a struct.
While the solution is the same, the difficulty is to find the right place to initialize the struct, which most likely will be "NewSomething" function.
https://stackoverflow.com/questions/27553399/golang-how-to-initialize-a-map-field-within-a-struct