Skip to content

Commit a0fa98f

Browse files
authored
Merge pull request #37 from bysph/master
fix golint errors
2 parents 3b44a3d + 5b4ede7 commit a0fa98f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/agent/agentserver/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
type ProxyClientConnection struct {
3030
Mode string
3131
Grpc agent.ProxyService_ProxyServer
32-
Http net.Conn
32+
HTTP net.Conn
3333
connected chan struct{}
3434
connectID int64
3535
}
@@ -40,9 +40,9 @@ func (c *ProxyClientConnection) send(pkt *agent.Packet) error {
4040
return stream.Send(pkt)
4141
} else if c.Mode == "http-connect" {
4242
if pkt.Type == agent.PacketType_CLOSE_RSP {
43-
return c.Http.Close()
43+
return c.HTTP.Close()
4444
} else if pkt.Type == agent.PacketType_DATA {
45-
_, err := c.Http.Write(pkt.GetData().Data)
45+
_, err := c.HTTP.Write(pkt.GetData().Data)
4646
return err
4747
} else if pkt.Type == agent.PacketType_DIAL_RSP {
4848
return nil

pkg/agent/agentserver/tunnel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (t *Tunnel) ServeHTTP(w http.ResponseWriter, r *http.Request) {
6969
connected := make(chan struct{})
7070
connection := &ProxyClientConnection{
7171
Mode: "http-connect",
72-
Http: conn,
72+
HTTP: conn,
7373
connected: connected,
7474
}
7575
t.Server.PendingDial[random] = connection

0 commit comments

Comments
 (0)