util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Strings strings = ""

Variables

This section is empty.

Functions

func FilterSlice

func FilterSlice[T any](items []T, filter func(T) bool) []T

func KeyFunc

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

func Keys

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

func MapSlice

func MapSlice[T, E any](items []T, mapper func(T) E) []E

func Pow64

func Pow64(a, b int64) int64

func Ptr

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

func SHA256

func SHA256(s []byte) []byte

func Set

func Set[T comparable](items []T) map[T]struct{}

func ToStringMap

func ToStringMap[T ~string](items []T) []string

func TronHexToBase58

func TronHexToBase58(address string) string

input: 41b35b60a4572e473e492ee35f0750f95c682e081c output: TSKZRR9egK9YSXGdbVQGrVoBVc18AYpEBz

Types

This section is empty.

Jump to

Keyboard shortcuts

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