util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenAllMatchDomain

func GenAllMatchDomain(name string) []string

GenAllMatchDomain 生成能够与目标域名匹配的所有解析域名的翻转格式 如 "a.b.example.com" -> ["com.example.b.a", "com.example.b.a.*", "com.example.b.*", "com.example.*"]

func SliceDeduplication

func SliceDeduplication[T comparable](ts []T) []T

SliceDeduplication 对切片元素进行去重,但是需要确保切片是可比较的

func SliceEqual added in v0.1.0

func SliceEqual[T comparable](a, b []T) bool

SliceEqual 比较切片元素的值是否相等,忽略切片元素的顺序

func SliceRandom

func SliceRandom[T any](p []T) []T

SliceRandom 返回经过乱序后的 p

Types

This section is empty.

Jump to

Keyboard shortcuts

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