package
Version:
v0.1.6
Opens a new window with list of versions in this module.
Published: Jul 22, 2025
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Slice2Map[T any, K comparable](slice []T, fn func(T) K) map[K]T
Slice2Map 遍历处理slice的每个元素,结果作为map的key,原slice的元素作为value
func SliceMap[T any](slice []T, fn func(T) T) []T
SliceMap 遍历处理slice的每个元素,结果替换原slice对应的元素
Source Files
¶
Click to show internal directories.
Click to hide internal directories.