misc/elastic-inference-validator/elastic-inference-validator.go
func matchWithoutOrder(a1, a2 []string) bool {
	if len(a1) != len(a2) {
		return false
	}

	m := make(map[string]bool)

	for _, x := range a1 {
		m[x] = true
	}

	for _, y := range a2 {
		if _, ok := m[y]; !ok {
			return false
		}
	}

	return true
}
func matchWithoutOrder(a1, a2 []string) bool {
	if len(a1) != len(a2) {
		return false
	}

	m := make(map[string]bool)

	for _, x := range a1 {
		m[x] = true
	}

	for _, y := range a2 {
		if _, ok := m[y]; !ok {
			return false
		}
	}

	return true
}
func matchWithoutOrder ( a1 , a2 [ ] string ) bool { if len ( a1 ) != len ( a2 ) { return false } m := make ( map [ string ] bool ) for _ , x := range a1 { m [ x ] = true } for _ , y := range a2 { if _ , ok := m [ y ] ; ! ok { return false } } return true }
// helper func to check whether two lists of (distinct) strings matches without order
helper func to check whether two lists of ( distinct ) strings matches without order