Documentation ¶
Index ¶
- Constants
- func EnsureDirectory(path string, mode fs.FileMode) error
- func EnsureFile(path string, mode fs.FileMode) error
- func FilterSlice[T any](items []T, filter func(T) bool) []T
- func KeyFunc[V any, K comparable](items []V, fn func(V) K) map[K]V
- func Keys[T comparable, V any](items map[T]V) []T
- func MapSlice[T, E any](items []T, mapper func(T) E) []E
- func Pow64(a, b int64) int64
- func Ptr[T any](v T) *T
- func SHA256(s []byte) []byte
- func Set[T comparable](items []T) map[T]struct{}
- func ToStringMap[T ~string](items []T) []string
- func TronHexToBase58(address string) string
Constants ¶
View Source
const Strings strings = ""
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectory ¶ added in v0.1.2
EnsureDirectory checks that file exists. If not, creates an empty directory.
func EnsureFile ¶ added in v0.1.2
EnsureFile checks that file exists. If not, creates an empty file.
func FilterSlice ¶
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 Set ¶
func Set[T comparable](items []T) map[T]struct{}
func ToStringMap ¶
func TronHexToBase58 ¶
input: 41b35b60a4572e473e492ee35f0750f95c682e081c output: TSKZRR9egK9YSXGdbVQGrVoBVc18AYpEBz
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.