Documentation ¶
Index ¶
- Variables
- func BoolToString(b bool) string
- func ContainsAny(s string, strs ...string) bool
- func ContainsAnyIgnoreCase(s string, strs ...string) bool
- func DeduplicateIds(ids string) string
- func EqualsAnyIgnoreCase(s string, strs ...string) bool
- func ExtractEmails(text string) []string
- func FileExists(filePath string) bool
- func FormatDate(tm time.Time) string
- func FormatMail(name, mail string) string
- func FormatTime(tm time.Time) string
- func GetCachePath(rootPath, filename string) string
- func IsMatchPath(path, smath string) bool
- func MD5(data []byte) string
- func MD5Str(data string) string
- func Millisecond() uint32
- func ParseMail(recipient string) (name string, mail string, err error)
- func RemoveDuplicates(nums []string) []string
- func ReplaceAllRegex(path, regex, math string) string
- func SplitAndDeduplicate(text, sep string) []string
- func SplitPath(path string) []string
- func StringToUintIds(ids string) []uint
- type Config
- func (cfg *Config) GetBooleanOrDefault(section, name string, defaultValue bool) bool
- func (cfg *Config) GetInt(section, name string) (int, error)
- func (cfg *Config) GetInt64OrDefault(section, name string, defaultValue int64) int64
- func (cfg *Config) GetIntOrDefault(section, name string, defaultValue int) int
- func (cfg *Config) GetString(section, name string) string
- func (cfg *Config) GetStringOrDefault(section, name string, defaultValue string) string
- func (cfg *Config) Save() error
- func (cfg *Config) SetBoolean(section, key string, value bool) error
- func (cfg *Config) SetInt(section, key string, value int) error
- func (cfg *Config) SetString(section, key string, value string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DateFormat = "2006-01-02"
View Source
var TimestampFormat = "2006-01-02 15:04:05"
Functions ¶
func BoolToString ¶
func ContainsAny ¶
func ContainsAnyIgnoreCase ¶
func DeduplicateIds ¶
func EqualsAnyIgnoreCase ¶
func ExtractEmails ¶
func FileExists ¶
func FormatDate ¶
func FormatMail ¶
func FormatTime ¶
func GetCachePath ¶
func IsMatchPath ¶
func Millisecond ¶
func Millisecond() uint32
func RemoveDuplicates ¶
func ReplaceAllRegex ¶
func SplitAndDeduplicate ¶ added in v0.1.12
func StringToUintIds ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetBooleanOrDefault ¶
func (*Config) GetInt64OrDefault ¶
func (*Config) GetIntOrDefault ¶
func (*Config) GetStringOrDefault ¶
Click to show internal directories.
Click to hide internal directories.