Logo
Explore Help
Sign In
status-im/consul
2
0
Fork 0
You've already forked consul
mirror of https://github.com/status-im/consul.git synced 2025-01-13 07:14:37 +00:00
Code Issues Projects Releases Wiki Activity
consul/lib/string_test.go

16 lines
226 B
Go
Raw Normal View History

Factor out duplicate functions into a lib package Consolidate code duplication and tests into a single lib package. Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports. The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions. Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 11:42:34 -08:00
package lib
import (
"testing"
)
func TestStrContains(t *testing.T) {
l := []string{"a", "b", "c"}
if !StrContains(l, "b") {
t.Fatalf("should contain")
}
if StrContains(l, "d") {
t.Fatalf("should not contain")
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 590ms Template: 28ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API