sliceopt

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElementExists

func ElementExists[T comparable](list []T, element T) bool

定义泛型函数,T是一个类型参数

func FilterUniqueElements

func FilterUniqueElements(original, filter []string) []string

func SliceRmDuplication

func SliceRmDuplication[T comparable](old []T) []T

切片去重 使用泛型来去除切片中的重复元素 go > 1.18

func StringSliceToIntSlice

func StringSliceToIntSlice(stringSlice []string) ([]int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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