sliceUtils

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 1 Imported by: 0

README

Kushuh go slice utils

Compare

Check if two slices are equal in Go. Both slice can be of any type, but their elements should be sorted in the same order.

slice1 := []int{2,1,3}
slice2 := []int{2,1,3}
slice1 := []int{3,2,1}

isEqual := sliceUtils.Compare(slice1, slice2) // return true

isEqual = sliceUtils.Compare(slice1, slice3) // return false

2020 Kushuh - [MIT license](htt ps://github.com/Alvarios/kushuh-go-utils/blob/master/LICENSE)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(ma, mb interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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