horizoncd/horizon

View on GitHub
pkg/idp/models/models.go

Summary

Maintainability
A
1 hr
Test Coverage

Method TokenEndpointAuthMethod.Scan has 6 return statements (exceeds 4 allowed).
Open

func (t *TokenEndpointAuthMethod) Scan(value interface{}) error {
    bts, ok := value.([]byte)
    if !ok {
        return fmt.Errorf("failed to unmarshal TokenEndpointAuthMethod from value: %v", value)
    }
Severity: Major
Found in pkg/idp/models/models.go - About 40 mins to fix

    Method TokenEndpointAuthMethod.UnmarshalJSON has 5 return statements (exceeds 4 allowed).
    Open

    func (t *TokenEndpointAuthMethod) UnmarshalJSON(data []byte) error {
        str := string(data)
        switch str {
        case fmt.Sprintf("\"%s\"", ClientSecretSentAsPostStr):
            *t = ClientSecretSentAsPost
    Severity: Major
    Found in pkg/idp/models/models.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status