w

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 27

Documentation

Index

Constants

View Source
const (
	PosRight = iota
	PosLeft
	PosCenter
)

Variables

This section is empty.

Functions

func E

func E[T any](_ T, err error) error

func Filter

func Filter[T any](old []T, f func(item T) bool) []T

func Find

func Find[T any](s []T, t T, compare func(a, b T) bool) int

func Has

func Has[T any](s []T, t T, compare func(a, b T) bool) bool

func Include

func Include[T comparable](s []T, t T) bool

func Index

func Index[T comparable](s []T, t T) int

func Interfaces

func Interfaces[T any](objs []T) []interface{}

func JSONStringer

func JSONStringer(v any) fmt.Stringer

func Limit

func Limit[T any](s []T, limit int, hidePosition int, manySuffix ...T) []T

func M

func M[T any](v T, err error) T

func Map

func Map[S any, T any](old []S, f func(item S) T) []T

func NewStringer

func NewStringer(stringer func() string) fmt.Stringer

func P

func P[T any](o T) *T

Types

type Stringer

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

func (Stringer) String

func (s Stringer) String() string

Jump to

Keyboard shortcuts

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