diff --git a/internal/ogtags/mem_test.go b/internal/ogtags/mem_test.go index 9db4d68c..c9482cc3 100644 --- a/internal/ogtags/mem_test.go +++ b/internal/ogtags/mem_test.go @@ -1,11 +1,12 @@ package ogtags import ( - "golang.org/x/net/html" "net/url" "runtime" "strings" "testing" + + "golang.org/x/net/html" ) func BenchmarkGetTarget(b *testing.B) { diff --git a/internal/ogtags/ogtags_fuzz_test.go b/internal/ogtags/ogtags_fuzz_test.go index c6e40fa5..752aa2fa 100644 --- a/internal/ogtags/ogtags_fuzz_test.go +++ b/internal/ogtags/ogtags_fuzz_test.go @@ -1,11 +1,12 @@ package ogtags import ( - "golang.org/x/net/html" "net/url" "strings" "testing" "unicode/utf8" + + "golang.org/x/net/html" ) // FuzzGetTarget tests getTarget with various inputs diff --git a/lib/policy/config/config.go b/lib/policy/config/config.go index 55fb3c04..5e2a96b4 100644 --- a/lib/policy/config/config.go +++ b/lib/policy/config/config.go @@ -170,9 +170,9 @@ func (b *BotConfig) Valid() error { } type ChallengeRules struct { - Algorithm string `json:"algorithm"` - Difficulty int `json:"difficulty"` - ReportAs int `json:"report_as"` + Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"` + Difficulty int `json:"difficulty,omitempty" yaml:"difficulty,omitempty"` + ReportAs int `json:"report_as,omitempty" yaml:"report_as,omitempty"` } var (