Skip to content

Commit ace8207

Browse files
Removed \n from Println and Linted all the code
1 parent 1dede22 commit ace8207

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

api/routes/routes.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ import (
1111
/* all routes for all features are registered here */
1212
func RegisterRoutes(mux *http.ServeMux) {
1313

14-
/* for monitoring the state of overall server and laclm backend */
15-
mux.Handle("GET /health", http.HandlerFunc(
16-
middleware.LoggingMiddleware(
17-
middleware.AuthenticationMiddleware(health.HealthHandler),
18-
),
19-
))
20-
2114
/* for logging into the backend and creating a session */
2215
mux.Handle("POST /login", http.HandlerFunc(
2316
middleware.LoggingMiddleware(auth.LoginHandler),
2417
))
18+
19+
/* for monitoring the state of overall server and laclm backend */
20+
mux.Handle("GET /health", http.HandlerFunc(
21+
middleware.LoggingMiddleware(health.HealthHandler),
22+
))
2523
}

cmd/laclm/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func exec() error {
3131

3232
err := godotenv.Load()
3333
if err != nil {
34-
fmt.Println("No .env file found, continuing with system environment variables\n")
34+
fmt.Print("No .env file found, continuing with system environment variables\n")
3535
}
3636

3737
/* setting up cobra for cli interactions */
@@ -48,7 +48,7 @@ func exec() error {
4848
if configPath != "" {
4949
fmt.Printf("Using config file: %s\n\n", configPath)
5050
} else {
51-
fmt.Println("No config file provided.\n\n")
51+
fmt.Printf("No config file provided.\n\n")
5252
}
5353
},
5454
}

config/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (r *TransactionLogRedis) Normalize() error {
3636
/* password can be empty */
3737
if r.Password == "" {
3838
/* just warn users to use password protected redis */
39-
fmt.Println("Prefer using password for redis for security purposes\n")
39+
fmt.Printf("Prefer using password for redis for security purposes\n\n")
4040
}
4141

4242
/* r.DB default value can be 0 */

0 commit comments

Comments
 (0)