Documentation
¶
Overview ¶
basestruct ¶
Provides a simple struct with common 4 fields to be embedded by other structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
Err error `json:"Err,omitempty"`
LogLevel int `json:"LogLevel,omitempty"`
Initialized bool `json:"Initialized,omitempty"`
MyType string `json:"MyType,omitempty"` // Store typename. Cheaper way than reflector for logging.
OnErrContinue bool `json:"OnErrContinue,omitempty"`
}
A simple struct to be embedded by other struct
func (*Base) CheckErrInit ¶
To be put at the beginning of Check error and initialization state in following order:
- If `Err` not nil -> check failed -> return `false`
- If `Initialized` is `false` -> check failed -> set `Err` -> then return `false`
- All else, check passed -> return `true`
Click to show internal directories.
Click to hide internal directories.