Documentation ¶
Index ¶
- func Back(arr []string) (string, []string)
- func Chunk(arr []string, size int) [][]string
- func Contains(arr []string, e string) bool
- func Delete(arr []string, i int) []string
- func Excludes(base []string, target []string) []string
- func Insert(arr []string, v string, i int) []string
- func Int64Back(arr []int64) (int64, []int64)
- func Int64Chunk(arr []int64, size int) [][]int64
- func Int64Contains(arr []int64, e int64) bool
- func Int64Delete(arr []int64, i int) []int64
- func Int64Excludes(base []int64, target []int64) []int64
- func Int64Insert(arr []int64, v int64, i int) []int64
- func Int64Mix(arrList [][]int64) []int64
- func Int64Shift(arr []int64) (int64, []int64)
- func Int64Shuffle(arr []int64) []int64
- func Int64Uniq(arr []int64) []int64
- func IntBack(arr []int) (int, []int)
- func IntChunk(arr []int, size int) [][]int
- func IntContains(arr []int, e int) bool
- func IntDelete(arr []int, i int) []int
- func IntExcludes(base []int, target []int) []int
- func IntInsert(arr []int, v int, i int) []int
- func IntMix(arrList [][]int) []int
- func IntShift(arr []int) (int, []int)
- func IntShuffle(arr []int) []int
- func IntUniq(arr []int) []int
- func Mix(arrList [][]string) []string
- func Shift(arr []string) (string, []string)
- func Shuffle(arr []string) []string
- func Uniq(arr []string) []string
- type Stream
- func (s *Stream) Contains(fn interface{}) bool
- func (s *Stream) Count() int
- func (s *Stream) Filter(fn interface{}) *Stream
- func (s *Stream) ForEach(fn interface{}) *Stream
- func (s *Stream) Map(fn interface{}) *Stream
- func (s *Stream) Out() interface{}
- func (s *Stream) Reduce(fn interface{}) interface{}
- func (s *Stream) Sort(fn interface{}) *Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64Excludes ¶
Int64Excludes ... int64配列で指定したbaseの中でtargetに含まれない値の配列を取得
func Int64Insert ¶
Int64Insert ... int64配列の任意の場所に挿入する
func IntExcludes ¶
IntExcludes ... int配列で指定したbaseの中でtargetに含まれない値の配列を取得
Types ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream ... スライス操作
func (*Stream) Contains ¶
dst := StreamOf(hoges).
Contains(func(hoge *Hoge) bool { return hoge.ID == "abc" })
Contains ... 要素の存在確認
func (*Stream) Filter ¶
dst := StreamOf(hoges).
Filter(func(hoge *Hoge) bool { return hoge.Num > 3 }).Out().([]*Hoge)
Filter ... 要素のフィルタリング
func (*Stream) ForEach ¶
dst := StreamOf(hoges).
ForEach(func(hoge *Hoge, i int) { hoge.ID = "abc" })
ForEach ... 要素のループ
func (*Stream) Map ¶
dst := StreamOf(hoges).
Map(func(hoge *Hoge) string { return hoge.ID }).Out().([]string)
Map ... 要素の変換
Click to show internal directories.
Click to hide internal directories.