dip/vendor/github.com/likexian/gokit/xslice
Paul Lecuq c320cc8133
All checks were successful
continuous-integration/drone/push Build is passing
updated dip, removing packr, updated dependencies, fixes
2022-08-18 01:16:43 +02:00
..
README.md updated dip, removing packr, updated dependencies, fixes 2022-08-18 01:16:43 +02:00
xslice.go updated dip, removing packr, updated dependencies, fixes 2022-08-18 01:16:43 +02:00

GoKit - xslice

Slice kits for Golang development.

Installation

go get -u github.com/likexian/gokit

Importing

import (
    "github.com/likexian/gokit/xslice"
)

Documentation

Visit the docs on GoDoc

Example

Get unique of string array

array := xslice.Unique([]string{"a", "a", "b", "b", "b", "c"})
fmt.Println("new array:", array)

Get unique of int array

array := xslice.Unique([]int{0, 0, 1, 1, 1, 2, 2, 3})
fmt.Println("new array:", array)

License

Copyright 2012-2022 Li Kexian

Licensed under the Apache License 2.0

Donation

If this project is helpful, please share it with friends.

If you want to thank me, you can give me a cup of coffee.