gslice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeSliceInUniq added in v0.0.8

func MergeSliceInUniq(a []string, b []string) (rs map[string]struct{})

MergeSliceInUniq merges two slice of string into map in unique.

func MergeSliceInUniqAndOrder added in v0.0.10

func MergeSliceInUniqAndOrder(merged []string, part []string) (rs []string)

MergeSliceInUniqAndOrder merges two slice of string into map in unique.

func SliceIndex

func SliceIndex(limit int, predicate func(i int) bool) int

SliceIndex get item index of a slice

ref:https://stackoverflow.com/a/8307594/913751

func UniqMapToSlice added in v0.0.8

func UniqMapToSlice(m map[string]struct{}) (rs []string)

UniqMapToSlice converts a map into a slice of string.

func UniqMapToSliceInt64 added in v0.0.12

func UniqMapToSliceInt64(m map[int64]struct{}) (rs []int64)

UniqMapToSliceInt64 converts a map into a slice of int64.

Types

type Int64Slice added in v0.0.12

type Int64Slice []int64

func (Int64Slice) Len added in v0.0.12

func (x Int64Slice) Len() int

func (Int64Slice) Less added in v0.0.12

func (x Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap added in v0.0.12

func (x Int64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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