Documentation
¶
Index ¶
- Constants
- func AddPathSeparatorIfAbsent(path string) string
- func CreateDirIfNotExists(dirname string) error
- func CurrentTimeMillis() uint64
- func CurrentTimeNano() uint64
- func FileExists(name string) (b bool, err error)
- func FilePosition(file *os.File) (int64, error)
- func FormatDate(tsMillis uint64) string
- func FormatTimeMillis(tsMillis uint64) string
- func IncrementAndGetInt64(v *int64) int64
- func IsBlank(s string) bool
- func RunWithRecover(f func(), logger logging.Logger)
- type AtomicBool
- type SliceHeader
- type StringHeader
Constants ¶
View Source
const ( TimeFormat = "2006-01-02 15:04:05" DateFormat = "2006-01-02" UnixTimeUnitOffset = uint64(time.Millisecond / time.Nanosecond) )
Variables ¶
This section is empty.
Functions ¶
func CreateDirIfNotExists ¶
func CurrentTimeMillis ¶
func CurrentTimeMillis() uint64
Returns the current Unix timestamp in milliseconds.
func CurrentTimeNano ¶
func CurrentTimeNano() uint64
Returns the current Unix timestamp in nanoseconds.
func FileExists ¶
func FormatDate ¶
FormatDate converts to date string tsMillis accurates to millisecond,otherwise, an exception will occur
func FormatTimeMillis ¶
FormatTimeMillis converts Millisecond to time string tsMillis accurates to millisecond,otherwise, an exception will occur
func IncrementAndGetInt64 ¶
func RunWithRecover ¶
Types ¶
type AtomicBool ¶
type AtomicBool struct {
// contains filtered or unexported fields
}
func (*AtomicBool) CompareAndSet ¶
func (b *AtomicBool) CompareAndSet(old, new bool) bool
func (*AtomicBool) Get ¶
func (b *AtomicBool) Get() bool
func (*AtomicBool) Set ¶
func (b *AtomicBool) Set(value bool)
type SliceHeader ¶
SliceHeader is a safe version of SliceHeader used within this project.
type StringHeader ¶
StringHeader is a safe version of StringHeader used within this project.
Click to show internal directories.
Click to hide internal directories.