[优化] go 引用调整

This commit is contained in:
ryan
2026-06-06 10:26:20 +08:00
parent ee1110b752
commit 3cfefb4367
552 changed files with 1642 additions and 2185 deletions
+21
View File
@@ -0,0 +1,21 @@
package router_test
import (
"os"
"strings"
"testing"
)
func TestGeneratedSwaggerSpecExists(t *testing.T) {
data, err := os.ReadFile("../docs/swagger.json")
if err != nil {
t.Fatalf("failed to read generated swagger spec: %v", err)
}
content := string(data)
if !strings.Contains(content, "\"title\": \"OpenFlare Server API\"") {
t.Fatal("expected swagger spec title to exist")
}
if !strings.Contains(content, "\"/api/proxy-routes/\"") {
t.Fatal("expected swagger spec to contain proxy route endpoint")
}
}