Skip to content

jeremmfr/go-utils

Repository files navigation

go-utils

Go Reference Release Report Card Go Status Lint Status codecov

Golang utility functions

Usage

package main

import (
     "fmt"

     "github.com/jeremmfr/go-utils/basiccheck"
)

func main() {
     s1 := []string{"foo", "bar"}
     s2 := []string{"bar", "foo"}

     if basiccheck.SimilarSlice(s1, s2) {
          fmt.Printf("%v =~ %v", s1, s2)
          // Output: [foo bar] =~ [bar foo]
     } else {
          fmt.Printf("%v != %v", s1, s2)
     }
}