mirror of
https://github.com/fatedier/frp.git
synced 2025-07-24 14:51:39 +07:00
Use go fmt before build
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
package conn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"bufio"
|
||||
"sync"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
)
|
||||
|
||||
type Listener struct {
|
||||
Addr net.Addr
|
||||
Conns chan *Conn
|
||||
Addr net.Addr
|
||||
Conns chan *Conn
|
||||
}
|
||||
|
||||
// wait util get one
|
||||
@ -22,8 +22,8 @@ func (l *Listener) GetConn() (conn *Conn) {
|
||||
}
|
||||
|
||||
type Conn struct {
|
||||
TcpConn *net.TCPConn
|
||||
Reader *bufio.Reader
|
||||
TcpConn *net.TCPConn
|
||||
Reader *bufio.Reader
|
||||
}
|
||||
|
||||
func (c *Conn) ConnectServer(host string, port int64) (err error) {
|
||||
@ -70,8 +70,8 @@ func Listen(bindAddr string, bindPort int64) (l *Listener, err error) {
|
||||
}
|
||||
|
||||
l = &Listener{
|
||||
Addr: listener.Addr(),
|
||||
Conns: make(chan *Conn),
|
||||
Addr: listener.Addr(),
|
||||
Conns: make(chan *Conn),
|
||||
}
|
||||
|
||||
go func() {
|
||||
@ -83,7 +83,7 @@ func Listen(bindAddr string, bindPort int64) (l *Listener, err error) {
|
||||
}
|
||||
|
||||
c := &Conn{
|
||||
TcpConn: conn,
|
||||
TcpConn: conn,
|
||||
}
|
||||
c.Reader = bufio.NewReader(c.TcpConn)
|
||||
l.Conns <- c
|
||||
|
@ -22,7 +22,7 @@ func SetLogFile(logWay string, logFile string) {
|
||||
if logWay == "console" {
|
||||
Log.SetLogger("console", "")
|
||||
} else {
|
||||
Log.SetLogger("file", `{"filename": "` + logFile + `"}`)
|
||||
Log.SetLogger("file", `{"filename": "`+logFile+`"}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user