Skip to content

Commit

Permalink
fix code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zachmann committed Dec 2, 2024
1 parent 08f8527 commit ee4fadf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/endpoints/notification/calendar/calendar.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func HandleGetICS(ctx *fiber.Ctx) error {
return calendarNotFoundError.Send(ctx)
}
ctx.Set(fiber.HeaderContentType, "text/calendar")
ctx.Set(fiber.HeaderContentDisposition, fmt.Sprintf(`attachment; filename="%s"`, info.Name))
ctx.Set(fiber.HeaderContentDisposition, fmt.Sprintf(`attachment; filename=%q`, info.Name))
return ctx.SendString(info.ICS)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (r *AuthCodeFlowRequest) Scan(src interface{}) error {
}

// Value implements the driver.Valuer interface
func (r AuthCodeFlowRequest) Value() (driver.Value, error) { // skipcq: CRT-P0003
func (r AuthCodeFlowRequest) Value() (driver.Value, error) { // skipcq: CRT-P0003, RVV-B0006
r.IncludedProfiles = nil
v, err := json.Marshal(r)
return v, errors.WithStack(err)
Expand Down
2 changes: 1 addition & 1 deletion internal/mytoken/pkg/mytoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func parseJWT(token string, skipCalimsValidation bool) (*Mytoken, error) {
SkipClaimsValidation: skipCalimsValidation,
}
tok, err := parser.ParseWithClaims(
token, &Mytoken{}, func(t *jwt.Token) (interface{}, error) {
token, &Mytoken{}, func(_ *jwt.Token) (interface{}, error) {
return jws.GetPublicKey(jws.KeyUsageMytokenSigning), nil
},
)
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/iputils/iputils.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func compareIPToHost(ip, host string) bool {
if strings.HasSuffix(ipHost, host[1:]) {
return true
}
} else if strings.Compare(ipHost, host) == 0 {
} else if ipHost == host {
return true
}
}
Expand Down

0 comments on commit ee4fadf

Please sign in to comment.