feat: create standalone native fnOS repository

This commit is contained in:
2026-10-02 15:19:09 +08:00
parent 69f3c30fab
commit 6725fc131d
492 changed files with 94023 additions and 3 deletions
@@ -0,0 +1,21 @@
package ddns
import (
"context"
"testing"
)
func TestResolveZoneForACMEChallenge(t *testing.T) {
zones := map[string]bool{
"example.com": true,
}
zone, host, err := ResolveZoneForFQDN(context.Background(), func(candidate string) (bool, error) {
return zones[candidate], nil
}, "_acme-challenge.example.com")
if err != nil {
t.Fatal(err)
}
if zone != "example.com" || host != "_acme-challenge" {
t.Fatalf("unexpected zone=%s host=%s", zone, host)
}
}