summaryrefslogtreecommitdiffhomepage
path: root/gobgpd/main.go
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-07-31 14:52:14 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2017-07-31 15:01:19 +0900
commitf54a995391c4d0d8f22c6e9e6420f8ad0e6047b7 (patch)
treec579be19c724de56df0ee26bec203fb82321c083 /gobgpd/main.go
parent1848ab250341890430b048e4f3689d26de980f47 (diff)
gobgpd: Avoid name collision
alias "p" for "github.com/kr/pretty" collides the local variable "p" for Peer structure. This patch fixes to avoid this name collision and also sorts the import order with goimports. e.g.) goimports -w -local github.com/osrg/gobgp gobgpd/main.go Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'gobgpd/main.go')
-rw-r--r--gobgpd/main.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go
index caf1793f..8b292caa 100644
--- a/gobgpd/main.go
+++ b/gobgpd/main.go
@@ -25,15 +25,16 @@ import (
"syscall"
"github.com/jessevdk/go-flags"
- p "github.com/kr/pretty"
+ "github.com/kr/pretty"
+ log "github.com/sirupsen/logrus"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials"
+
api "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet/bgp"
"github.com/osrg/gobgp/server"
"github.com/osrg/gobgp/table"
- log "github.com/sirupsen/logrus"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials"
)
func main() {
@@ -115,7 +116,7 @@ func main() {
go config.ReadConfigfileServe(opts.ConfigFile, opts.ConfigType, configCh)
c := <-configCh
if opts.LogLevel == "debug" {
- p.Println(c)
+ pretty.Println(c)
}
os.Exit(0)
}