m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 07:13:48 -05:00

Replace fmt.Errorf with no parameters with errors.New (#3747)

This commit is contained in:
Cheng
2024-04-22 08:35:33 +08:00
committed by GitHub
parent af3ce47c44
commit d18d92f925

View File

@@ -78,7 +78,7 @@ func startHttpServer(address listenAddress, actionChannel chan []*action, respon
port := address.port port := address.port
apiKey := os.Getenv("FZF_API_KEY") apiKey := os.Getenv("FZF_API_KEY")
if !address.IsLocal() && len(apiKey) == 0 { if !address.IsLocal() && len(apiKey) == 0 {
return port, fmt.Errorf("FZF_API_KEY is required to allow remote access") return port, errors.New("FZF_API_KEY is required to allow remote access")
} }
addrStr := fmt.Sprintf("%s:%d", host, port) addrStr := fmt.Sprintf("%s:%d", host, port)
listener, err := net.Listen("tcp", addrStr) listener, err := net.Listen("tcp", addrStr)