summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-11 13:00:52 +0300
committerValery Piashchynski <[email protected]>2021-01-11 13:00:52 +0300
commitc4112cd214a9c7cbed82c82eefc75904fb42d1af (patch)
tree680cc5f0d3f9a0d78a944e026568af61c12bd87e /util
parent5dc83ef5eee77f4d1ef557e5f8b566e75892680d (diff)
Update CI
Format imports and code Distinct internal and app errors
Diffstat (limited to 'util')
-rw-r--r--util/network.go3
-rw-r--r--util/network_test.go3
-rw-r--r--util/network_windows_test.go5
-rw-r--r--util/state.go1
-rw-r--r--util/state_test.go5
5 files changed, 11 insertions, 6 deletions
diff --git a/util/network.go b/util/network.go
index d858cb0a..f35d842b 100644
--- a/util/network.go
+++ b/util/network.go
@@ -5,11 +5,12 @@ package util
import (
"errors"
"fmt"
- "github.com/valyala/tcplisten"
"net"
"os"
"strings"
"syscall"
+
+ "github.com/valyala/tcplisten"
)
// CreateListener crates socket listener based on DSN definition.
diff --git a/util/network_test.go b/util/network_test.go
index 09157ec0..1dc16e94 100644
--- a/util/network_test.go
+++ b/util/network_test.go
@@ -3,8 +3,9 @@
package util
import (
- "github.com/stretchr/testify/assert"
"testing"
+
+ "github.com/stretchr/testify/assert"
)
func TestCreateListener(t *testing.T) {
diff --git a/util/network_windows_test.go b/util/network_windows_test.go
index a5a8064e..3fdc8a5c 100644
--- a/util/network_windows_test.go
+++ b/util/network_windows_test.go
@@ -3,8 +3,9 @@
package util
import (
- "github.com/stretchr/testify/assert"
"testing"
+
+ "github.com/stretchr/testify/assert"
)
func TestCreateListener(t *testing.T) {
@@ -13,4 +14,4 @@ func TestCreateListener(t *testing.T) {
_, err = CreateListener("aaa://192.168.0.1")
assert.Error(t, err, "Invalid Protocol (tcp://:6001, unix://file.sock)")
-} \ No newline at end of file
+}
diff --git a/util/state.go b/util/state.go
index 29fca945..5a08f9f2 100644
--- a/util/state.go
+++ b/util/state.go
@@ -2,6 +2,7 @@ package util
import (
"errors"
+
"github.com/shirou/gopsutil/process"
"github.com/spiral/roadrunner"
)
diff --git a/util/state_test.go b/util/state_test.go
index 2afe682e..2a4a140b 100644
--- a/util/state_test.go
+++ b/util/state_test.go
@@ -1,11 +1,12 @@
package util
import (
- "github.com/spiral/roadrunner"
- "github.com/stretchr/testify/assert"
"runtime"
"testing"
"time"
+
+ "github.com/spiral/roadrunner"
+ "github.com/stretchr/testify/assert"
)
func TestServerState(t *testing.T) {