utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abort

func Abort(format string, args ...interface{})

func Capitalize

func Capitalize(s string) string

func FormatDuration added in v1.0.0

func FormatDuration(d time.Duration) string

func FormatRelativeDate

func FormatRelativeDate(t time.Time, now time.Time) (s string)

func JSONEncode

func JSONEncode(value interface{}) ([]byte, error)

func Panicf

func Panicf(format string, args ...interface{})

func RecoverValueData

func RecoverValueData(value interface{}) (msg, trace string)

func Ref

func Ref[T any](x T) *T

func ShellEscape added in v1.0.0

func ShellEscape(s string) string

func StringsContain

func StringsContain(ss []string, s string) bool

func ToSentence

func ToSentence(s string) string

func YAMLEncode

func YAMLEncode(jsonValue interface{}) ([]byte, error)

func YAMLValueToJSONValue

func YAMLValueToJSONValue(yamlValue interface{}) (interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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