typeutil

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice2Map

func Slice2Map[T any, K comparable](slice []T, fn func(T) K) map[K]T

Slice2Map 遍历处理slice的每个元素,结果作为map的key,原slice的元素作为value

func SliceMap

func SliceMap[T any](slice []T, fn func(T) T) []T

SliceMap 遍历处理slice的每个元素,结果替换原slice对应的元素

Types

This section is empty.

Jump to

Keyboard shortcuts

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