feat: support SSO

This commit is contained in:
weloe
2023-06-09 03:30:51 +08:00
parent ecef85c8af
commit 446789e261
20 changed files with 1824 additions and 1 deletions

22
util/util_test.go Normal file
View File

@@ -0,0 +1,22 @@
package util
import (
"testing"
)
func TestAppendStr(t *testing.T) {
strings := []string{"1", "2"}
str := AppendStr(strings, "1")
str = AppendStr(str, "3")
for i, s := range strings {
if s == "1" && i == 2 {
t.Errorf("AppendStr() = %v, want %v", str, []string{"1", "2"})
}
}
for i, s := range strings {
if i == 2 && s != "3" {
t.Errorf("AppendStr() = %v, want %v", str, []string{"1", "2", "3"})
}
}
}