Skip to content

Commit 094782a

Browse files
committed
fix(server): linting issues
1 parent d8ecead commit 094782a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

server/handlers/app.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func AppHandler() gin.HandlerFunc {
3030
return
3131
}
3232

33-
redirect_uri := strings.TrimSpace(c.Query("redirect_uri"))
33+
redirectURI := strings.TrimSpace(c.Query("redirect_uri"))
3434
state := strings.TrimSpace(c.Query("state"))
3535
scopeString := strings.TrimSpace(c.Query("scope"))
3636

@@ -41,11 +41,11 @@ func AppHandler() gin.HandlerFunc {
4141
scope = strings.Split(scopeString, " ")
4242
}
4343

44-
if redirect_uri == "" {
45-
redirect_uri = hostname + "/app"
44+
if redirectURI == "" {
45+
redirectURI = hostname + "/app"
4646
} else {
4747
// validate redirect url with allowed origins
48-
if !validators.IsValidOrigin(redirect_uri) {
48+
if !validators.IsValidOrigin(redirectURI) {
4949
log.Debug("Invalid redirect_uri")
5050
c.JSON(400, gin.H{"error": "invalid redirect url"})
5151
return
@@ -75,7 +75,7 @@ func AppHandler() gin.HandlerFunc {
7575
c.HTML(http.StatusOK, "app.tmpl", gin.H{
7676
"data": map[string]interface{}{
7777
"authorizerURL": hostname,
78-
"redirectURL": redirect_uri,
78+
"redirectURL": redirectURI,
7979
"scope": scope,
8080
"state": state,
8181
"organizationName": orgName,

server/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ import (
1515
"github.com/authorizerdev/authorizer/server/routes"
1616
)
1717

18+
// VERSION is used to define the version of authorizer from build tags
1819
var VERSION string
1920

21+
// LogUTCFormatter hels in setting UTC time format for the logs
2022
type LogUTCFormatter struct {
2123
log.Formatter
2224
}
2325

26+
// Format helps fomratting time to UTC
2427
func (u LogUTCFormatter) Format(e *log.Entry) ([]byte, error) {
2528
e.Time = e.Time.UTC()
2629
return u.Formatter.Format(e)

0 commit comments

Comments
 (0)