parsing

package
v1.0.1000 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 13 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountSI

func ByteCountSI(b int64) string

func ParseValidatorError

func ParseValidatorError(err error) (res error)

func RemoveNulls

func RemoveNulls(m map[string]interface{}) map[string]interface{}

func RoundFloatPrecisionUp

func RoundFloatPrecisionUp(val float64, precision uint) float64

func ToFixed

func ToFixed(num float64, precision int) float64

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type DurationUnit

type DurationUnit struct {
	Day    int `json:"day"`
	Hour   int `json:"hour"`
	Minute int `json:"minute"`
	Second int `json:"second"`
}

DurationUnit -

type ErrorValidation

type ErrorValidation struct {
	Type  string `json:"type"`
	Field string `json:"field"`
	Tag   string `json:"tag"`
}

type Stacks

type Stacks struct {
	Func    string `json:"func"`
	Package string `json:"package"`
	File    string `json:"file"`
	Line    int    `json:"line"`
}

func ParseStack

func ParseStack(stack []byte) (res []Stacks)

type Time

type Time struct{}

func NewTime

func NewTime() *Time

func (*Time) Duration

func (c *Time) Duration(dur time.Duration) (format string)

Duration - convert golang time duration to string format DD:HH:MM:SS

func (*Time) DurationToUnit

func (c *Time) DurationToUnit(dur time.Duration) (format DurationUnit)

DurationToUnit - convert time duration to individual unit

func (*Time) TimeStringDateOnly

func (c *Time) TimeStringDateOnly(dur time.Time) (format string)

TimeStringDateOnly -

func (*Time) TimeStringTimeOnly

func (c *Time) TimeStringTimeOnly(dur time.Time) (format string)

TimeStringTimeOnly -

func (*Time) TimeStringTimeOnlyWithMilliSecond

func (c *Time) TimeStringTimeOnlyWithMilliSecond(s time.Time) (ts string)

TimeStringTimeOnlyWithMilliSecond -

func (*Time) TimeStringWitLongDate

func (c *Time) TimeStringWitLongDate(dur time.Time) (format string)

TimeStringWitLongDate -

func (*Time) TimeStringWithDate

func (c *Time) TimeStringWithDate(dur time.Time) (format string)

TimeStringWithDate -

func (*Time) UnixTime

func (c *Time) UnixTime(t int64) (ts time.Time)

UnixTime - convert unix time to golang time format

func (*Time) UnixTimeNano

func (c *Time) UnixTimeNano(t int64) (ts time.Time)

UnixTimeNano - convert unix nano time to golang time format

Directories

Path Synopsis
Package bytesize provides a way to show readable values of byte size by reediting the code from http://golang.org/doc/effective_go.html.
Package bytesize provides a way to show readable values of byte size by reediting the code from http://golang.org/doc/effective_go.html.

Jump to

Keyboard shortcuts

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