diff --git a/main.go b/main.go index bc7123d..1cbe94b 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "crypto/tls" "flag" "fmt" @@ -10,8 +11,6 @@ import ( "github.com/spf13/viper" - "context" - "git.daplie.com/Daplie/go-rvpn-server/rvpn/genericlistener" ) diff --git a/rvpn/envelope/envelope.go b/rvpn/envelope/envelope.go index b484b40..38476c1 100644 --- a/rvpn/envelope/envelope.go +++ b/rvpn/envelope/envelope.go @@ -1,9 +1,11 @@ package envelope -import "time" -import "encoding/json" -import "bytes" -import "io" +import ( + "bytes" + "encoding/json" + "io" + "time" +) //Envelope -- Standard daplie response structure type Envelope struct { diff --git a/rvpn/genericlistener/api_collect_status.go b/rvpn/genericlistener/api_collect_status.go index d2bfb25..88a2c5f 100644 --- a/rvpn/genericlistener/api_collect_status.go +++ b/rvpn/genericlistener/api_collect_status.go @@ -1,6 +1,8 @@ package genericlistener -import "time" +import ( + "time" +) //StatusAPI -- Structure to support the server API type StatusAPI struct { diff --git a/rvpn/genericlistener/api_interface.go b/rvpn/genericlistener/api_interface.go index 01645b7..e24a364 100644 --- a/rvpn/genericlistener/api_interface.go +++ b/rvpn/genericlistener/api_interface.go @@ -7,8 +7,9 @@ import ( "strconv" "strings" - "git.daplie.com/Daplie/go-rvpn-server/rvpn/envelope" "github.com/gorilla/mux" + + "git.daplie.com/Daplie/go-rvpn-server/rvpn/envelope" ) const ( diff --git a/rvpn/genericlistener/connection.go b/rvpn/genericlistener/connection.go index b64ac30..201f96f 100755 --- a/rvpn/genericlistener/connection.go +++ b/rvpn/genericlistener/connection.go @@ -1,20 +1,16 @@ package genericlistener import ( + "context" + "encoding/hex" + "io" "strconv" + "sync" "time" - "git.daplie.com/Daplie/go-rvpn-server/rvpn/packer" - - "sync" - - "io" - - "context" - - "encoding/hex" - "github.com/gorilla/websocket" + + "git.daplie.com/Daplie/go-rvpn-server/rvpn/packer" ) var upgrader = websocket.Upgrader{ diff --git a/rvpn/genericlistener/connection_registration.go b/rvpn/genericlistener/connection_registration.go index 974874c..abaddd6 100644 --- a/rvpn/genericlistener/connection_registration.go +++ b/rvpn/genericlistener/connection_registration.go @@ -1,6 +1,8 @@ package genericlistener -import "github.com/gorilla/websocket" +import ( + "github.com/gorilla/websocket" +) //Registration -- A connection registration structure used to bring up a connection //connection table will then handle additing and sdtarting up the various readers diff --git a/rvpn/genericlistener/connection_table.go b/rvpn/genericlistener/connection_table.go index e0a2f6e..b946bba 100755 --- a/rvpn/genericlistener/connection_table.go +++ b/rvpn/genericlistener/connection_table.go @@ -1,8 +1,10 @@ package genericlistener -import "fmt" -import "time" -import "context" +import ( + "context" + "fmt" + "time" +) const ( initialDomains = 0 diff --git a/rvpn/genericlistener/listener_generic.go b/rvpn/genericlistener/listener_generic.go index ab6d731..f17b986 100644 --- a/rvpn/genericlistener/listener_generic.go +++ b/rvpn/genericlistener/listener_generic.go @@ -1,24 +1,22 @@ package genericlistener import ( + "bufio" "bytes" "context" "crypto/tls" "encoding/hex" "log" "net" + "net/http" "strconv" "strings" "time" - jwt "github.com/dgrijalva/jwt-go" + "github.com/dgrijalva/jwt-go" "github.com/gorilla/mux" "github.com/gorilla/websocket" - "net/http" - - "bufio" - "git.daplie.com/Daplie/go-rvpn-server/rvpn/packer" ) diff --git a/rvpn/genericlistener/tls_get_hello.go b/rvpn/genericlistener/tls_get_hello.go index 0ddb051..4e45611 100644 --- a/rvpn/genericlistener/tls_get_hello.go +++ b/rvpn/genericlistener/tls_get_hello.go @@ -1,6 +1,8 @@ package genericlistener -import "errors" +import ( + "errors" +) func getHello(b []byte) (string, error) { rest := b[5:]