Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 890 Bytes

README.md

File metadata and controls

42 lines (31 loc) · 890 Bytes

generigo

build-img doc-img coverage-img

Simple common methods for Go

Examples

import "github.com/dlampsi/generigo"

String in slice

str := "apple"
slice := []string{"pineapple", "apple", "onion"}

if generigo.StringInSlice(str, slice) {
    // Proccess case
}

Compare slices

slice1 := []string{"one", "two"}
slice2 := []string{"two", "one"}

if generigo.CompareStringSlices(slice1, slice2) {
    // Proccess case
}