utils

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentMicros

func CurrentMicros() int64

CurrentMicros returns the current microseconds.

func CurrentMillis

func CurrentMillis() int64

CurrentMillis returns the current milliseconds.

func IsLowerCase added in v1.0.17

func IsLowerCase(r rune) bool

IsLowerCase returns true if the rune in a-z

func IsUpperCase added in v1.0.17

func IsUpperCase(r rune) bool

IsUpperCase returns true if the rune in A-Z

func ToCamelCase added in v1.0.17

func ToCamelCase(s string) string

ToCamelCase returns a copy string by converting snake case into camel case

func ToLower added in v1.0.17

func ToLower(s string) string

ToLower returns a copy string by converting it into lower

func ToLowerCase added in v1.0.17

func ToLowerCase(r rune) rune

ToLowerCase converts rune into lower case

func ToSnakeCase added in v1.0.17

func ToSnakeCase(s string) string

ToSnakeCase returns a copy string by converting camel case into snake case

func ToUpper added in v1.0.17

func ToUpper(s string) string

ToUpper returns a copy string by converting it into upper

func ToUpperCase added in v1.0.17

func ToUpperCase(r rune) rune

ToUpperCase converts rune into upper case

func UnExport added in v1.0.17

func UnExport(text string) bool

UnExport converts the first letter into lower case

func UpperFirst added in v1.0.17

func UpperFirst(s string) string

UpperFirst converts s[0] into upper case

Types

type ElapsedTimer

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

A ElapsedTimer is a timer to track the elapsed time.

func NewElapsedTimer

func NewElapsedTimer() *ElapsedTimer

NewElapsedTimer returns a ElapsedTimer.

func (*ElapsedTimer) Duration

func (et *ElapsedTimer) Duration() time.Duration

Duration returns the elapsed time.

func (*ElapsedTimer) Elapsed

func (et *ElapsedTimer) Elapsed() string

Elapsed returns the string representation of elapsed time.

func (*ElapsedTimer) ElapsedMs

func (et *ElapsedTimer) ElapsedMs() string

ElapsedMs returns the elapsed time of string on milliseconds.

Jump to

Keyboard shortcuts

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