Skip to content

Commit ee4fadf

Browse files
committed
fix code issues
1 parent 08f8527 commit ee4fadf

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

internal/endpoints/notification/calendar/calendar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func HandleGetICS(ctx *fiber.Ctx) error {
8181
return calendarNotFoundError.Send(ctx)
8282
}
8383
ctx.Set(fiber.HeaderContentType, "text/calendar")
84-
ctx.Set(fiber.HeaderContentDisposition, fmt.Sprintf(`attachment; filename="%s"`, info.Name))
84+
ctx.Set(fiber.HeaderContentDisposition, fmt.Sprintf(`attachment; filename=%q`, info.Name))
8585
return ctx.SendString(info.ICS)
8686
}
8787

internal/endpoints/token/mytoken/pkg/authCodeFlowRequest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (r *AuthCodeFlowRequest) Scan(src interface{}) error {
5757
}
5858

5959
// Value implements the driver.Valuer interface
60-
func (r AuthCodeFlowRequest) Value() (driver.Value, error) { // skipcq: CRT-P0003
60+
func (r AuthCodeFlowRequest) Value() (driver.Value, error) { // skipcq: CRT-P0003, RVV-B0006
6161
r.IncludedProfiles = nil
6262
v, err := json.Marshal(r)
6363
return v, errors.WithStack(err)

internal/mytoken/pkg/mytoken.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func parseJWT(token string, skipCalimsValidation bool) (*Mytoken, error) {
303303
SkipClaimsValidation: skipCalimsValidation,
304304
}
305305
tok, err := parser.ParseWithClaims(
306-
token, &Mytoken{}, func(t *jwt.Token) (interface{}, error) {
306+
token, &Mytoken{}, func(_ *jwt.Token) (interface{}, error) {
307307
return jws.GetPublicKey(jws.KeyUsageMytokenSigning), nil
308308
},
309309
)

internal/utils/iputils/iputils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func compareIPToHost(ip, host string) bool {
102102
if strings.HasSuffix(ipHost, host[1:]) {
103103
return true
104104
}
105-
} else if strings.Compare(ipHost, host) == 0 {
105+
} else if ipHost == host {
106106
return true
107107
}
108108
}

0 commit comments

Comments
 (0)