diff --git a/cmd/robots2policy/main.go b/cmd/robots2policy/main.go index 717e6415..481c4f37 100644 --- a/cmd/robots2policy/main.go +++ b/cmd/robots2policy/main.go @@ -36,8 +36,7 @@ type RobotsRule struct { IsBlacklist bool // true if this is a specifically denied user agent } -//betteralign:ignore, we want name to be the first field -type AnubisRule struct { +type AnubisRule struct { // betteralign:ignore, we want name to be the first field Name string `yaml:"name" json:"name"` Action string `yaml:"action" json:"action"` Expression map[string]interface{} `yaml:"expression,omitempty" json:"expression,omitempty"` diff --git a/internal/ogtags/ogtags.go b/internal/ogtags/ogtags.go index 3779c062..7b7c9d94 100644 --- a/internal/ogtags/ogtags.go +++ b/internal/ogtags/ogtags.go @@ -21,17 +21,17 @@ const ( ) type OGTagCache struct { - cache *decaymap.Impl[string, map[string]string] - targetURL *url.URL - client *http.Client + cache *decaymap.Impl[string, map[string]string] + targetURL *url.URL + client *http.Client + + // Pre-built strings for optimization + unixPrefix string // "http://unix" approvedTags []string approvedPrefixes []string ogTimeToLive time.Duration ogCacheConsiderHost bool ogPassthrough bool - - // Pre-built strings for optimization - unixPrefix string // "http://unix" } func NewOGTagCache(target string, ogPassthrough bool, ogTimeToLive time.Duration, ogTagsConsiderHost bool) *OGTagCache {