chore: initialize containerized Go learning workbook (2026 DevOps/SRE)

This commit is contained in:
soda64 committed 2026-11-30 23:03:31 +01:00
commit 84be3e5d77
64 files changed
+1382

No files matched your search

@@ -0,0 +1,27 @@
package collections
import (
"reflect"
"testing"
)
func TestUniqueInts(t *testing.T) {
got := UniqueInts([]int{3, 1, 2, 3, 1, 4})
want := []int{3, 1, 2, 4}
if !reflect.DeepEqual(got, want) {
t.Fatalf("got %v, want %v", got, want)
}
}
func TestWordCounts(t *testing.T) {
got := WordCounts("Go go is fast and GO works")
if got["go"] != 3 || got["fast"] != 1 {
t.Fatalf("unexpected counts: %v", got)
}
}
func TestReverseRunes(t *testing.T) {
if got := ReverseRunes("zażółć"); got != "ćłóżaz" {
t.Fatalf("got %q, want %q", got, "ćłóżaz")
}
}