Add rule-set

This commit is contained in:
世界
2023-12-01 13:24:12 +08:00
parent 7df151e820
commit 4b43acfec0
51 changed files with 2975 additions and 265 deletions

View File

@@ -164,7 +164,7 @@ func (d *Duration) UnmarshalJSON(bytes []byte) error {
if err != nil {
return err
}
duration, err := time.ParseDuration(value)
duration, err := ParseDuration(value)
if err != nil {
return err
}
@@ -174,6 +174,14 @@ func (d *Duration) UnmarshalJSON(bytes []byte) error {
type DNSQueryType uint16
func (t DNSQueryType) String() string {
typeName, loaded := mDNS.TypeToString[uint16(t)]
if loaded {
return typeName
}
return F.ToString(uint16(t))
}
func (t DNSQueryType) MarshalJSON() ([]byte, error) {
typeName, loaded := mDNS.TypeToString[uint16(t)]
if loaded {