mirror of
https://github.com/fatedier/frp.git
synced 2025-08-03 04:23:52 +00:00
lint by golangci-lint (#3080)
This commit is contained in:
@@ -33,9 +33,11 @@ func NewMockServers(portAllocator *port.Allocator) *MockServers {
|
||||
httpPort := portAllocator.Get()
|
||||
s.tcpEchoServer = streamserver.New(streamserver.TCP, streamserver.WithBindPort(tcpPort))
|
||||
s.udpEchoServer = streamserver.New(streamserver.UDP, streamserver.WithBindPort(udpPort))
|
||||
s.httpSimpleServer = httpserver.New(httpserver.WithBindPort(httpPort), httpserver.WithHandler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
w.Write([]byte(consts.TestString))
|
||||
})))
|
||||
s.httpSimpleServer = httpserver.New(httpserver.WithBindPort(httpPort),
|
||||
httpserver.WithHandler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
_, _ = w.Write([]byte(consts.TestString))
|
||||
})),
|
||||
)
|
||||
|
||||
udsIndex := portAllocator.Get()
|
||||
udsAddr := fmt.Sprintf("%s/frp_echo_server_%d.sock", os.TempDir(), udsIndex)
|
||||
|
Reference in New Issue
Block a user