linters: add httpstatus linter

This commit is contained in:
2026-10-18 15:02:44 -07:00
parent 7b5000b663
commit 9f10798be1
9 changed files with 315 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package httpstatus
import "github.com/golangci/plugin-module-register/register"
type Settings struct {
TypicalStatusCodes []int `json:"typical_status_codes"`
IsRestricted bool `json:"restrict"`
}
func decodeSettings(rawSettings any) (Settings, error) {
if rawSettings == nil {
return Settings{}, nil
}
return register.DecodeSettings[Settings](rawSettings)
}