Skip to content

Commit c36eba5

Browse files
authored
Merge pull request #28 from testwill/fmt
chore: unnecessary use of fmt.Sprintf
2 parents 6f2b770 + 7ea30f6 commit c36eba5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/dbhelper/mon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func GetRedisVM() ([]Redis, error) {
7878
}
7979
rows.Close()
8080
}
81-
sql = fmt.Sprintf("select cluster_name,owner from redis_vm")
81+
sql = "select cluster_name,owner from redis_vm"
8282
vm_owner := map[string]string{}
8383
rows, err := mon.Query(sql)
8484
if err != nil {

pkg/middlewares/luc/luc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func Luc(g *gin.Context) {
2121
}
2222
token := g.GetHeader("x-user-token")
2323
if token == "" || token == "null" {
24-
errlog := fmt.Sprintf("luc get token failed")
24+
errlog := "luc get token failed"
2525
g.JSON(http.StatusBadRequest, Result(errlog, false))
2626
g.Abort()
2727
return

0 commit comments

Comments
 (0)