utils

package
v0.0.0-...-1196ed7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressPtrToStringPtr

func AddressPtrToStringPtr(addr *common.Address) *string

func AddressToString

func AddressToString(addr common.Address) string

func ClonePtr

func ClonePtr[T any](v *T) *T

func DateOnly

func DateOnly(t time.Time) time.Time

func Filter

func Filter[T any](slice []T, f func(T) bool) []T

func IDFromRequest

func IDFromRequest(r *http.Request, key string) types.ID

func IDPtrToStringPtr

func IDPtrToStringPtr(id *types.ID) *string

func In

func In[T comparable](slice []T, x T) bool

func Int32PtrToIntPtr

func Int32PtrToIntPtr(i *int32) *int

func IntPtrToInt32Ptr

func IntPtrToInt32Ptr(i *int) *int32

func IntPtrToUintPtr

func IntPtrToUintPtr(i *int) *uint

func Paginate

func Paginate[T any](slice []T, page int, pageSize int, extra int) []T

func Ptr

func Ptr[T any](v T) *T

func StringPtrToAddressPtr

func StringPtrToAddressPtr(hex *string) *common.Address

func StringPtrToIDtr

func StringPtrToIDtr(hex *string) *types.ID

func UintPtrToIntPtr

func UintPtrToIntPtr(i *uint) *int

func Version

func Version() string

func WaitForChannelsToClose

func WaitForChannelsToClose[T any](chans ...chan T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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