Documentation ¶
Index ¶
- func Ellipsis(s string, maxLength int, breakOnSpace bool) string
- func FromJson[T any](data []byte) (*T, error)
- func FromJsonFile[T any](path string) (*T, error)
- func GetConfig[T any](args []string, configPathFlag string) (*T, error)
- func IfEmpty(a string, b string) string
- func IfNull[T any](a *T, b *T) *T
- func OrExit[T any](v T, e error) T
- func Set[T any](target *T) func(T)
- func UUID4() string
- func UUID4For(i interface{}) string
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ellipsis ¶
Ellipsis truncates string to be at most maxLength runes long maxLength = resultStringLength + len("...")
func FromJsonFile ¶
FromJsonFile decodes json file into an object
func GetConfig ¶
GetConfig loads configuration defined by type T. Initial configuration is loaded from file defined by the "config" flag, File values could be overridden by the command line flags.
Types ¶
Click to show internal directories.
Click to hide internal directories.