Versions in this module Expand all Collapse all v1 v1.0.0 Sep 11, 2021 Changes in this version + var ErrEnvironmentVariableIsNotSetOrEmpty = errors.New("environment variable is not set or empty") + var ErrShouldNotBeNil = errors.New("should not be nil") + var ErrSliceIsNil = errors.New("slice is nil") + var ErrStringIsEmpty = errors.New("string is empty") + type EnvUtils struct + var Env *EnvUtils + func (*EnvUtils) GetBool(env string) (value bool, err error) + func (*EnvUtils) GetInt(env string) (value int, err error) + func (*EnvUtils) GetOrDefaultBool(env string, defaultValue bool) (value bool) + func (*EnvUtils) GetOrDefaultInt(env string, defaultValue int) (value int) + func (*EnvUtils) GetOrDefaultSecond(env string, defaultValue time.Duration) (value time.Duration) + func (*EnvUtils) GetOrDefaultString(env, defaultValue string) (value string) + func (*EnvUtils) GetSecond(env string) (value time.Duration, err error) + func (*EnvUtils) GetString(env string) (value string, err error) + type MIMEUtils struct + var MIME *MIMEUtils + func (*MIMEUtils) DetectContentType(reader io.Reader) (contentType string, err error) + type SliceUtils struct + var Slice *SliceUtils + func (*SliceUtils) ContainsInt(slice []int, value int) bool + func (*SliceUtils) ContainsString(slice []string, value string) bool