Use go fmt before build

This commit is contained in:
fatedier 2016-02-03 18:46:24 +08:00
parent bdcdafd768
commit fa9356936b
12 changed files with 66 additions and 66 deletions

View File

@ -2,12 +2,15 @@ export PATH := $(GOPATH)/bin:$(PATH)
all: build all: build
build: godep frps frpc build: godep fmt frps frpc
godep: godep:
@go get github.com/tools/godep @go get github.com/tools/godep
godep restore godep restore
fmt:
@godep go fmt ./...
frps: frps:
godep go build -o bin/frps ./cmd/frps godep go build -o bin/frps ./cmd/frps

View File

@ -20,7 +20,6 @@ var (
var ProxyClients map[string]*models.ProxyClient = make(map[string]*models.ProxyClient) var ProxyClients map[string]*models.ProxyClient = make(map[string]*models.ProxyClient)
func LoadConf(confFile string) (err error) { func LoadConf(confFile string) (err error) {
var tmpStr string var tmpStr string
var ok bool var ok bool

View File

@ -1,9 +1,9 @@
package main package main
import ( import (
"encoding/json"
"io" "io"
"sync" "sync"
"encoding/json"
"github.com/fatedier/frp/pkg/models" "github.com/fatedier/frp/pkg/models"
"github.com/fatedier/frp/pkg/utils/conn" "github.com/fatedier/frp/pkg/utils/conn"

View File

@ -20,7 +20,6 @@ var (
var ProxyServers map[string]*models.ProxyServer = make(map[string]*models.ProxyServer) var ProxyServers map[string]*models.ProxyServer = make(map[string]*models.ProxyServer)
func LoadConf(confFile string) (err error) { func LoadConf(confFile string) (err error) {
var tmpStr string var tmpStr string
var ok bool var ok bool

View File

@ -1,12 +1,12 @@
package main package main
import ( import (
"fmt"
"encoding/json" "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/models"
"github.com/fatedier/frp/pkg/utils/conn"
"github.com/fatedier/frp/pkg/utils/log"
) )
func ProcessControlConn(l *conn.Listener) { func ProcessControlConn(l *conn.Listener) {

View File

@ -3,8 +3,8 @@ package main
import ( import (
"os" "os"
"github.com/fatedier/frp/pkg/utils/log"
"github.com/fatedier/frp/pkg/utils/conn" "github.com/fatedier/frp/pkg/utils/conn"
"github.com/fatedier/frp/pkg/utils/log"
) )
func main() { func main() {

View File

@ -21,7 +21,6 @@ type ClientCtlRes struct {
GeneralRes GeneralRes
} }
type ServerCtlReq struct { type ServerCtlReq struct {
Type int64 `json:"type"` Type int64 `json:"type"`
} }

View File

@ -1,8 +1,8 @@
package models package models
import ( import (
"sync"
"container/list" "container/list"
"sync"
"github.com/fatedier/frp/pkg/utils/conn" "github.com/fatedier/frp/pkg/utils/conn"
"github.com/fatedier/frp/pkg/utils/log" "github.com/fatedier/frp/pkg/utils/log"

View File

@ -1,11 +1,11 @@
package conn package conn
import ( import (
"fmt"
"net"
"bufio" "bufio"
"sync" "fmt"
"io" "io"
"net"
"sync"
"github.com/fatedier/frp/pkg/utils/log" "github.com/fatedier/frp/pkg/utils/log"
) )