utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Indent = "  "

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](items []T, value T) bool

func Copy

func Copy[T any](items []T) []T

func Fprint

func Fprint(writer io.Writer, args ...any)

noinspection SpellCheckingInspection

func Fprintf

func Fprintf(writer io.Writer, format string, args ...any)

func Fprintln

func Fprintln(writer io.Writer, args ...any)

noinspection SpellCheckingInspection

func Indirect

func Indirect(instance any) any

func IsEmpty

func IsEmpty(instance any) bool

func IsErrorType

func IsErrorType(reflectType reflect.Type) bool

IsErrorType returns true if the type is an error.

func IsParentContext

func IsParentContext(parent context.Context, child context.Context) (ok bool)

func Keys

func Keys[K comparable, V any](items map[K]V) []K

func Reverse

func Reverse[T any](items []T)

func Values

func Values[K comparable, V any](items map[K]V) []V

Types

This section is empty.

Jump to

Keyboard shortcuts

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