mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
Use go fmt before build
This commit is contained in:
parent
bdcdafd768
commit
fa9356936b
5
Makefile
5
Makefile
@ -2,12 +2,15 @@ export PATH := $(GOPATH)/bin:$(PATH)
|
||||
|
||||
all: build
|
||||
|
||||
build: godep frps frpc
|
||||
build: godep fmt frps frpc
|
||||
|
||||
godep:
|
||||
@go get github.com/tools/godep
|
||||
godep restore
|
||||
|
||||
fmt:
|
||||
@godep go fmt ./...
|
||||
|
||||
frps:
|
||||
godep go build -o bin/frps ./cmd/frps
|
||||
|
||||
|
@ -20,7 +20,6 @@ var (
|
||||
|
||||
var ProxyClients map[string]*models.ProxyClient = make(map[string]*models.ProxyClient)
|
||||
|
||||
|
||||
func LoadConf(confFile string) (err error) {
|
||||
var tmpStr string
|
||||
var ok bool
|
||||
|
@ -1,9 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"sync"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/fatedier/frp/pkg/models"
|
||||
"github.com/fatedier/frp/pkg/utils/conn"
|
||||
|
@ -20,7 +20,6 @@ var (
|
||||
|
||||
var ProxyServers map[string]*models.ProxyServer = make(map[string]*models.ProxyServer)
|
||||
|
||||
|
||||
func LoadConf(confFile string) (err error) {
|
||||
var tmpStr string
|
||||
var ok bool
|
||||
|
@ -1,12 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
"github.com/fatedier/frp/pkg/utils/conn"
|
||||
"github.com/fatedier/frp/pkg/models"
|
||||
"github.com/fatedier/frp/pkg/utils/conn"
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
)
|
||||
|
||||
func ProcessControlConn(l *conn.Listener) {
|
||||
|
@ -3,8 +3,8 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
"github.com/fatedier/frp/pkg/utils/conn"
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -24,7 +24,7 @@ func (p *ProxyClient) GetLocalConn() (c *conn.Conn, err error) {
|
||||
|
||||
func (p *ProxyClient) GetRemoteConn(addr string, port int64) (c *conn.Conn, err error) {
|
||||
c = &conn.Conn{}
|
||||
defer func(){
|
||||
defer func() {
|
||||
if err != nil {
|
||||
c.Close()
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ type ClientCtlRes struct {
|
||||
GeneralRes
|
||||
}
|
||||
|
||||
|
||||
type ServerCtlReq struct {
|
||||
Type int64 `json:"type"`
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"container/list"
|
||||
"sync"
|
||||
|
||||
"github.com/fatedier/frp/pkg/utils/conn"
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
|
@ -1,11 +1,11 @@
|
||||
package conn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"bufio"
|
||||
"sync"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/fatedier/frp/pkg/utils/log"
|
||||
)
|
||||
|
@ -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+`"}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user