From 125fb845c653f1859e815e1f96c9ae7afb6d1f6f Mon Sep 17 00:00:00 2001
From: Luca Moser <moser.luca@gmail.com>
Date: Mon, 25 Nov 2019 10:39:03 +0100
Subject: [PATCH] use pflag and format imports

---
 packages/node/node.go                              | 3 ++-
 packages/node/parameters.go                        | 2 +-
 plugins/analysis/webinterface/httpserver/plugin.go | 2 +-
 plugins/autopeering/parameters/parameters.go       | 2 +-
 plugins/autopeering/server/tcp/server.go           | 5 +++--
 plugins/cli/cli.go                                 | 5 +++--
 plugins/cli/plugin.go                              | 5 +++--
 plugins/gossip/neighbors.go                        | 2 +-
 8 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/packages/node/node.go b/packages/node/node.go
index 84c46131..af82862d 100644
--- a/packages/node/node.go
+++ b/packages/node/node.go
@@ -1,9 +1,10 @@
 package node
 
 import (
-	"github.com/iotaledger/hive.go/parameter"
 	"sync"
 
+	"github.com/iotaledger/hive.go/parameter"
+
 	"github.com/iotaledger/goshimmer/packages/daemon"
 )
 
diff --git a/packages/node/parameters.go b/packages/node/parameters.go
index f1acb90c..78862fea 100644
--- a/packages/node/parameters.go
+++ b/packages/node/parameters.go
@@ -1,7 +1,7 @@
 package node
 
 import (
-	"flag"
+	flag "github.com/spf13/pflag"
 )
 
 const (
diff --git a/plugins/analysis/webinterface/httpserver/plugin.go b/plugins/analysis/webinterface/httpserver/plugin.go
index b88ca23c..a86fb7df 100644
--- a/plugins/analysis/webinterface/httpserver/plugin.go
+++ b/plugins/analysis/webinterface/httpserver/plugin.go
@@ -1,6 +1,6 @@
 package httpserver
 
-import(
+import (
 	"net/http"
 	"time"
 
diff --git a/plugins/autopeering/parameters/parameters.go b/plugins/autopeering/parameters/parameters.go
index 12b9b402..9903d1db 100644
--- a/plugins/autopeering/parameters/parameters.go
+++ b/plugins/autopeering/parameters/parameters.go
@@ -1,7 +1,7 @@
 package parameters
 
 import (
-	"flag"
+	flag "github.com/spf13/pflag"
 )
 
 const (
diff --git a/plugins/autopeering/server/tcp/server.go b/plugins/autopeering/server/tcp/server.go
index 5b9c2812..a5b83951 100644
--- a/plugins/autopeering/server/tcp/server.go
+++ b/plugins/autopeering/server/tcp/server.go
@@ -1,6 +1,9 @@
 package tcp
 
 import (
+	"math"
+	"net"
+
 	"github.com/iotaledger/goshimmer/packages/daemon"
 	"github.com/iotaledger/goshimmer/packages/network"
 	"github.com/iotaledger/goshimmer/packages/network/tcp"
@@ -12,8 +15,6 @@ import (
 	"github.com/iotaledger/hive.go/events"
 	"github.com/iotaledger/hive.go/parameter"
 	"github.com/pkg/errors"
-	"math"
-	"net"
 )
 
 var server = tcp.NewServer()
diff --git a/plugins/cli/cli.go b/plugins/cli/cli.go
index 0051c1a1..3d5a8722 100644
--- a/plugins/cli/cli.go
+++ b/plugins/cli/cli.go
@@ -1,14 +1,15 @@
 package cli
 
 import (
-	"flag"
 	"fmt"
-	"github.com/iotaledger/hive.go/parameter"
 	"os"
 	"path/filepath"
 	"sort"
 	"strings"
 
+	"github.com/iotaledger/hive.go/parameter"
+	flag "github.com/spf13/pflag"
+
 	"github.com/iotaledger/goshimmer/packages/node"
 )
 
diff --git a/plugins/cli/plugin.go b/plugins/cli/plugin.go
index bd77e2d5..c7ac5908 100644
--- a/plugins/cli/plugin.go
+++ b/plugins/cli/plugin.go
@@ -1,11 +1,12 @@
 package cli
 
 import (
-	"flag"
 	"fmt"
-	"github.com/iotaledger/hive.go/events"
 	"strings"
 
+	"github.com/iotaledger/hive.go/events"
+	flag "github.com/spf13/pflag"
+
 	"github.com/iotaledger/goshimmer/packages/node"
 	"github.com/iotaledger/hive.go/parameter"
 )
diff --git a/plugins/gossip/neighbors.go b/plugins/gossip/neighbors.go
index 51c40c7a..23107679 100644
--- a/plugins/gossip/neighbors.go
+++ b/plugins/gossip/neighbors.go
@@ -1,6 +1,6 @@
 package gossip
 
-import(
+import (
 	"math"
 	"net"
 	"strconv"
-- 
GitLab