Documentation
¶
Index ¶
- func StructSliceToMapSlice[T any](value []T) ([]map[string]any, error)
- func ToMap(value any) (map[string]any, error)
- type Console
- func (console *Console) Debug(a ...any)
- func (console *Console) Debugf(format string, a ...any)
- func (console *Console) Debugln(a ...any)
- func (console *Console) Error(a ...any)
- func (console *Console) Errorf(format string, a ...any)
- func (console *Console) Errorln(a ...any)
- func (console *Console) Info(a ...any)
- func (console *Console) Infof(format string, a ...any)
- func (console *Console) Infoln(a ...any)
- func (console *Console) Information(a ...any)
- func (console *Console) Informationf(format string, a ...any)
- func (console *Console) Informationln(a ...any)
- func (console *Console) ToggleVerboseMode(mode bool)
- func (console *Console) Warn(a ...any)
- func (console *Console) Warnf(format string, a ...any)
- func (console *Console) Warning(a ...any)
- func (console *Console) Warningf(format string, a ...any)
- func (console *Console) Warningln(a ...any)
- func (console *Console) Warnln(a ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StructSliceToMapSlice ¶
StructSliceToMapSlice converts the given slice to a slice of map
Types ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console represents a simple stdout printer, with colour support
func NewConsole ¶
NewConsole creates a new Console instance with default colour configurations for different message types, if the output is nil then os.Stdout is used
func (*Console) Debugln ¶
Debugln prints a debug message followed by a newline if verbose mode is enabled.
func (*Console) Information ¶
Information is an alias for Info. It prints an informational message.
func (*Console) Informationf ¶
Informationf is an alias for Infof. It prints a formatted informational message.
func (*Console) Informationln ¶
Informationln is an alias for Infoln. It prints an informational message followed by a newline.
func (*Console) ToggleVerboseMode ¶
ToggleVerboseMode enables or disables verbose mode for the console.