Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Init ¶
type Init struct {
// contains filtered or unexported fields
}
Init is a helper to perform initializer function only single time and return saved error if any
func (*Init) Do ¶
Do calls function initializer only for the first time for this instance of Init and saves error returned from it if any. Do returns nil if no error happened during the initializer execution or it returns error. Even in case of error during initializer execution it will not be called second time, error will be saved and return each time Do called. If initializer panics, it'll be recovered and captured as error and returned by future Do calls.
Click to show internal directories.
Click to hide internal directories.