Browse Source

chore: unnecessary use of fmt.Sprintf

guangwu 1 year ago
parent
commit
005d6cf4cf
1 changed files with 1 additions and 2 deletions
  1. 1 2
      experimental/clashapi/proxies.go

+ 1 - 2
experimental/clashapi/proxies.go

@@ -2,7 +2,6 @@ package clashapi
 
 import (
 	"context"
-	"fmt"
 	"net/http"
 	"sort"
 	"strconv"
@@ -176,7 +175,7 @@ func updateProxy(w http.ResponseWriter, r *http.Request) {
 
 	if !selector.SelectOutbound(req.Name) {
 		render.Status(r, http.StatusBadRequest)
-		render.JSON(w, r, newError(fmt.Sprintf("Selector update error: not found")))
+		render.JSON(w, r, newError("Selector update error: not found"))
 		return
 	}