chore: initial commit of ai site platform

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
whm
2026-07-31 10:31:17 +08:00
commit 4ca82fb58a
203 changed files with 45745 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package userstore
import "testing"
func TestNormalizeTenantSlug(t *testing.T) {
ok, err := NormalizeTenantSlug("Aaa-01")
if err != nil || ok != "aaa-01" {
t.Fatalf("got %q %v", ok, err)
}
if _, err := NormalizeTenantSlug("api"); err == nil {
t.Fatal("api should be reserved")
}
if _, err := NormalizeTenantSlug("1abc"); err == nil {
t.Fatal("must start with letter")
}
if SuggestTenantSlug("Hello World") != "hello-world" {
t.Fatalf("suggest ascii")
}
}