util

package
v0.0.0-...-c70c6bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(i int) int

func AlphaNumericWithKorean

func AlphaNumericWithKorean(s string) string

func Comma

func Comma(s string) string

func Contains

func Contains(n string, hs []string) bool

func ConvertToCatalogKeywords

func ConvertToCatalogKeywords(rules []any) ([]string, []string, []string)

func Date

func Date(days int, format string) string

func DateAfter

func DateAfter(ld, id string) bool

func DateBefore

func DateBefore(ld, id string) bool

func Dates

func Dates(start, end string) []string

func DeepEqual

func DeepEqual(s1, s2 []string) bool

func DhtmlxMapResponse

func DhtmlxMapResponse(ds []Interface, key string, cs string, ucs string) map[string]any

func DhtmlxResponse

func DhtmlxResponse(ds []Interface, key string, cs string, ucs string) []byte

func DiffDays

func DiffDays(start, end string) int

func DiffInt

func DiffInt(a, b []int) []int

func ExecutableDir

func ExecutableDir() string

func ExpandTag

func ExpandTag(t string) []string

func FullTime

func FullTime() string

func GreedyPattern

func GreedyPattern(s string) string

func IndexDate

func IndexDate(s string) string

func IsNumeric

func IsNumeric(s string) bool

func KibanaDate

func KibanaDate(t int64) string

func LocaleAlias

func LocaleAlias(l string) string

func Locales

func Locales() []string

func Microseconds

func Microseconds() int64

func Milliseconds

func Milliseconds() int64

func ModelNames

func ModelNames(t string) []string

func NarrowSpace

func NarrowSpace(s string) string

func NormalizeModelName

func NormalizeModelName(s string) string

func PatternToRegex

func PatternToRegex(p string) string

func Progress

func Progress(i, j int) string

func QuoteID

func QuoteID(x any) string

func RemoveSpace

func RemoveSpace(s string) string

func RemoveUnit

func RemoveUnit(s string) string

func Space

func Space(s string) string

func SpaceAlphabet

func SpaceAlphabet(s string) string

func SpaceKorean

func SpaceKorean(s string) string

func SpaceNumeric

func SpaceNumeric(s string) string

func SpaceOperators

func SpaceOperators(s string) string

func SpaceSpecialCharacter

func SpaceSpecialCharacter(s string) string

func SplitModelName

func SplitModelName(s string) []string

func StartWithNumber

func StartWithNumber(s string) bool

func StructToMap

func StructToMap(in any) (map[string]any, error)

func TimestampToString

func TimestampToString(ts int) string

func ToFloat64

func ToFloat64(x any) float64

func ToInt

func ToInt(x any) int

func ToInt64

func ToInt64(x any) int64

func ToString

func ToString(x any) string

func Today

func Today() string

func Trace

func Trace(msg string) func()

func Unique

func Unique(ss []string) []string

func Yesterday

func Yesterday() string

func Ymd

func Ymd(d string) string

Types

type CopyableMap

type CopyableMap map[string]any

func (CopyableMap) DeepCopy

func (m CopyableMap) DeepCopy() map[string]any

DeepCopy will create a deep copy of this map. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy.

type CopyableSlice

type CopyableSlice []any

func (CopyableSlice) DeepCopy

func (s CopyableSlice) DeepCopy() []any

DeepCopy will create a deep copy of this slice. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy.

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

func MergeMaps

func MergeMaps(maps ...Interface) (result Interface)

func Response

func Response(in any) []Interface

func (*Interface) Date

func (i *Interface) Date(k string) string

func (*Interface) DeepCopy

func (i *Interface) DeepCopy() Interface

func (*Interface) Float64

func (i *Interface) Float64(k string) float64

func (*Interface) From

func (i *Interface) From(v map[string]any)

func (*Interface) ID

func (i *Interface) ID(k string) string

func (*Interface) Int

func (i *Interface) Int(k string) int

func (*Interface) Int64

func (i *Interface) Int64(k string) int64

func (*Interface) KeyExist

func (i *Interface) KeyExist(k string) bool

func (*Interface) List

func (i *Interface) List(k string) []any

func (*Interface) Map

func (i *Interface) Map() map[string]any

func (*Interface) New

func (i *Interface) New()

func (*Interface) Raw

func (i *Interface) Raw(k string) any

func (*Interface) Remove

func (i *Interface) Remove(k string)

func (*Interface) Set

func (i *Interface) Set(k string, v any)

func (*Interface) String

func (i *Interface) String(k string) string

func (*Interface) Strings

func (i *Interface) Strings(k string) []string

func (*Interface) Uint

func (i *Interface) Uint(k string) uint

type ProgressInfo

type ProgressInfo struct {
	// contains filtered or unexported fields
}

func NewProgressInfo

func NewProgressInfo() *ProgressInfo

func (*ProgressInfo) AddDataProcessedCount

func (p *ProgressInfo) AddDataProcessedCount(c int)

func (*ProgressInfo) AddNodeProcessedCount

func (p *ProgressInfo) AddNodeProcessedCount(c int)

func (*ProgressInfo) SetDataCount

func (p *ProgressInfo) SetDataCount(c int)

func (*ProgressInfo) SetNodeCount

func (p *ProgressInfo) SetNodeCount(c int)

func (*ProgressInfo) String

func (p *ProgressInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL