diff --git a/goextVersion.go b/goextVersion.go index 2dd1fee..cc79826 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.241" +const GoextVersion = "0.0.242" -const GoextVersionTimestamp = "2023-08-14T15:54:50+0200" +const GoextVersionTimestamp = "2023-08-14T16:05:12+0200" diff --git a/langext/array.go b/langext/array.go index 7098b91..2f122ef 100644 --- a/langext/array.go +++ b/langext/array.go @@ -476,4 +476,6 @@ func JoinString(arr []string, delimiter string) string { str += delimiter } } + + return str } diff --git a/langext/array_test.go b/langext/array_test.go new file mode 100644 index 0000000..7c42b2b --- /dev/null +++ b/langext/array_test.go @@ -0,0 +1,12 @@ +package langext + +import ( + "gogs.mikescher.com/BlackForestBytes/goext/tst" + "testing" +) + +func TestJoinString(t *testing.T) { + ids := []string{"1", "2", "3"} + res := JoinString(ids, ",") + tst.AssertEqual(t, res, "1,2,3") +} diff --git a/langext/base58_test.go b/langext/base58_test.go index 11b1b86..da6ae23 100644 --- a/langext/base58_test.go +++ b/langext/base58_test.go @@ -1,6 +1,7 @@ package langext import ( + "gogs.mikescher.com/BlackForestBytes/goext/tst" "testing" ) @@ -59,9 +60,3 @@ func TestBase58FlickrDecoding(t *testing.T) { tst.AssertEqual(t, _decStr(t, Base58FlickrEncoding, "9aJCVZR"), "Hello") tst.AssertEqual(t, _decStr(t, Base58FlickrEncoding, "48638rmBiUzG5NKQoX4KcuE5C8paCFACnE28F7qDx13PRtennAmYSSJQ5gJSRihf5ZDyEQS4UimtihR7uARt4wbty2fW9duTQTM9n1DwUBevreyzGwu6W4YSgrvQgCPDxsiE1mCdZsF8VEBpuHHEiJyw"), "If debugging is the process of removing software bugs, then programming must be the process of putting them in.") } - -func tst.AssertEqual(t *testing.T, actual string, expected string) { - if actual != expected { - t.Errorf("values differ: Actual: '%v', Expected: '%v'", actual, expected) - } -}