17 lines
376 B
Go
17 lines
376 B
Go
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)
|
|
}
|