Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: ISC Imports: 9 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 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