diff --git a/dfssc/security/files.go b/dfssc/security/files.go index 5b41d6db7526546cf2792be9336156e48c72cb54..d5b5d9b298bb6e6e09cc01b9b83d93dcccc7e46f 100644 --- a/dfssc/security/files.go +++ b/dfssc/security/files.go @@ -7,12 +7,13 @@ import ( "crypto/rand" "crypto/rsa" "crypto/x509" - "dfss/auth" - "dfss/dfssc/common" "encoding/base64" "fmt" "io" "strings" + + "dfss/auth" + "dfss/dfssc/common" ) // GetCertificate return the Certificate stored on the disk diff --git a/dfssc/security/request.go b/dfssc/security/request.go index 4361986f0b6d0a246e74f0ca4391fef332b93fd5..e199e172d64d17006cfc30c5eddfc3a21db4e068 100644 --- a/dfssc/security/request.go +++ b/dfssc/security/request.go @@ -3,10 +3,10 @@ package security import ( "crypto/rsa" - "dfss/auth" - "dfss/dfssc/common" "fmt" + "dfss/auth" + "dfss/dfssc/common" "github.com/spf13/viper" ) diff --git a/dfssc/security/security_test.go b/dfssc/security/security_test.go index 64b733bdfc481f49245a0ab749ebd52ffe2077c6..a80ea05e377e376dec267fb0b100fd49d0919a8d 100644 --- a/dfssc/security/security_test.go +++ b/dfssc/security/security_test.go @@ -1,12 +1,12 @@ package security import ( - "dfss/dfssc/common" "fmt" "os" "path/filepath" "testing" + "dfss/dfssc/common" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) diff --git a/dfssc/sign/create_test.go b/dfssc/sign/create_test.go index f9a29a3148b9e56992ad8f4a6411f7ce08037812..d27577a2739d1d2c51bef652603f8ad4779799d0 100644 --- a/dfssc/sign/create_test.go +++ b/dfssc/sign/create_test.go @@ -10,7 +10,6 @@ import ( "dfss/auth" "dfss/mockp/server" - "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) diff --git a/dfssc/user/authentication.go b/dfssc/user/authentication.go index a17d11a1055212ffd3c6901c8db8e196b3203fe1..f9986cf152c7ca5b1f1edac3a1cb5e76543a95a8 100644 --- a/dfssc/user/authentication.go +++ b/dfssc/user/authentication.go @@ -1,18 +1,16 @@ package user import ( + "errors" "io/ioutil" "regexp" "time" - "github.com/spf13/viper" - "dfss/dfssc/common" "dfss/dfssc/security" pb "dfss/dfssp/api" "dfss/net" - "errors" - + "github.com/spf13/viper" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/dfssc/user/authentication_test.go b/dfssc/user/authentication_test.go index 36ee50256c94d3877209ab5a2786fd14ae1e5919..02e3bc0a7d5b31366bf6334dc796a38bf45aa194 100644 --- a/dfssc/user/authentication_test.go +++ b/dfssc/user/authentication_test.go @@ -1,11 +1,11 @@ package user import ( - "dfss/dfssc/common" "fmt" "os" "testing" + "dfss/dfssc/common" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) diff --git a/dfssc/user/client.go b/dfssc/user/client.go index b0f7632a8addad6ea010437971c89fd04edab81f..533a3c4a021aa0b9ac3d4c8ae580fa5bc41bd0b1 100644 --- a/dfssc/user/client.go +++ b/dfssc/user/client.go @@ -6,7 +6,6 @@ import ( "dfss/dfssc/security" pb "dfss/dfssp/api" "dfss/net" - "github.com/spf13/viper" ) diff --git a/dfssc/user/config.go b/dfssc/user/config.go index ce4210252d1892e6c1390af95a4bb8d8717d2189..87fa7eff4290b76f465946051e83e325d9c8c0e0 100644 --- a/dfssc/user/config.go +++ b/dfssc/user/config.go @@ -1,12 +1,12 @@ package user import ( - "dfss/auth" - "dfss/dfssc/common" - "dfss/dfssc/security" "encoding/json" "fmt" + "dfss/auth" + "dfss/dfssc/common" + "dfss/dfssc/security" "github.com/spf13/viper" ) diff --git a/dfssc/user/config_test.go b/dfssc/user/config_test.go index 7d26c9418ba4aba240f89e332e9c8b269e12f5e6..6d84852ae7cde20d413e6755dfdfd8c28f55e79c 100644 --- a/dfssc/user/config_test.go +++ b/dfssc/user/config_test.go @@ -1,13 +1,13 @@ package user import ( - "dfss/dfssc/common" - "dfss/dfssc/security" "fmt" "os" "path/filepath" "testing" + "dfss/dfssc/common" + "dfss/dfssc/security" "github.com/stretchr/testify/assert" ) diff --git a/dfssc/user/register_test.go b/dfssc/user/register_test.go index 26dab93a03c853ab5df66c829e73307018480f75..97739a2618c5b34f3c3565b3dbd0fd843c2c37b2 100644 --- a/dfssc/user/register_test.go +++ b/dfssc/user/register_test.go @@ -1,16 +1,16 @@ package user import ( - "dfss/auth" - "dfss/dfssc/common" - "dfss/dfssc/security" - "dfss/mockp/server" "fmt" "os" "path/filepath" "testing" "time" + "dfss/auth" + "dfss/dfssc/common" + "dfss/dfssc/security" + "dfss/mockp/server" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) diff --git a/dfssc/user/unregister.go b/dfssc/user/unregister.go index 76b59527e4e534388bb4d962bf9bad3ca361e51a..428922e74e226632c6840d8b4c2911ea3c210e0c 100644 --- a/dfssc/user/unregister.go +++ b/dfssc/user/unregister.go @@ -3,11 +3,10 @@ package user import ( "errors" - "golang.org/x/net/context" - "google.golang.org/grpc" - pb "dfss/dfssp/api" "dfss/net" + "golang.org/x/net/context" + "google.golang.org/grpc" ) // Unregister a user from the platform diff --git a/dfssp/authority/rootCA.go b/dfssp/authority/rootCA.go index 406913f5f825c375da99e6d83b1e3048f3b9102d..45226601a3b97f92ce55f3ae815679c171a34c90 100644 --- a/dfssp/authority/rootCA.go +++ b/dfssp/authority/rootCA.go @@ -8,9 +8,8 @@ import ( "os" "path/filepath" - "github.com/spf13/viper" - "dfss/auth" + "github.com/spf13/viper" ) // PlatformID contains platform private key and root certificate diff --git a/dfssp/contract/contract_test.go b/dfssp/contract/contract_test.go index cb326cbed790eb8f9d51ef8c387ad642f1bed2f1..e1e64e0f5239bf4e85f96faa8bee27ad5f310a35 100644 --- a/dfssp/contract/contract_test.go +++ b/dfssp/contract/contract_test.go @@ -11,7 +11,6 @@ import ( "dfss/dfssp/server" "dfss/mgdb" "dfss/net" - "github.com/spf13/viper" "github.com/stretchr/testify/assert" "gopkg.in/mgo.v2/bson" diff --git a/dfssp/contract/sequence_test.go b/dfssp/contract/sequence_test.go index acfea374f6b154369a5de421f4afcf1f475deaeb..b51ddec322f72cfb31b6bde24229bc8b537ca68e 100644 --- a/dfssp/contract/sequence_test.go +++ b/dfssp/contract/sequence_test.go @@ -1,9 +1,10 @@ package contract_test import ( + "testing" + "dfss/dfssp/contract" "github.com/stretchr/testify/assert" - "testing" ) var refSeq = []uint32{0, 1, 2, 0, 1, 2, 0, 1, 2} // for n = 3 diff --git a/dfssp/entities/contract.go b/dfssp/entities/contract.go index c8ced969caa41b75f8b422146e7fa0936bd079a3..ebda63f6e668fb131a2e2010c5747f0dc175fb56 100644 --- a/dfssp/entities/contract.go +++ b/dfssp/entities/contract.go @@ -2,9 +2,9 @@ package entities import ( - "dfss/mgdb" "time" + "dfss/mgdb" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) diff --git a/dfssp/entities/user.go b/dfssp/entities/user.go index 857747e4ad7f7e13b9313b290e625901486b7e9f..1901e906e548d5499e4079dd64f177447bb49a46 100644 --- a/dfssp/entities/user.go +++ b/dfssp/entities/user.go @@ -1,10 +1,9 @@ package entities import ( - "dfss/mgdb" - "time" + "dfss/mgdb" "gopkg.in/mgo.v2/bson" ) diff --git a/dfssp/user/auth_test.go b/dfssp/user/auth_test.go index bc83d9cbd2a800f304ece18939eb922424177af3..3a2a70c6721c4626b6ba1177cd54a73739888f8a 100644 --- a/dfssp/user/auth_test.go +++ b/dfssp/user/auth_test.go @@ -1,10 +1,10 @@ package user_test import ( - "dfss/dfssp/api" "testing" "time" + "dfss/dfssp/api" "dfss/dfssp/entities" "github.com/stretchr/testify/assert" "golang.org/x/net/context" diff --git a/dfssp/user/create_test.go b/dfssp/user/create_test.go index 184f9e24b0072a318c809f22d4b90792e9372833..9f45a35a7eb658a3c02466417cbe814a90946251 100644 --- a/dfssp/user/create_test.go +++ b/dfssp/user/create_test.go @@ -1,10 +1,10 @@ package user_test import ( - "dfss/dfssp/api" "testing" "time" + "dfss/dfssp/api" "dfss/dfssp/entities" "github.com/stretchr/testify/assert" "golang.org/x/net/context" diff --git a/dfsst/entities/archivesManager.go b/dfsst/entities/archivesManager.go index 8603e7748c815e598e5ab899a787ea8849d446ce..699feffce70177fb81f4d94578f2fad320e7177b 100644 --- a/dfsst/entities/archivesManager.go +++ b/dfsst/entities/archivesManager.go @@ -4,7 +4,6 @@ package entities import ( cAPI "dfss/dfssc/api" "dfss/mgdb" - "gopkg.in/mgo.v2/bson" ) diff --git a/dfsst/entities/archivesManager_test.go b/dfsst/entities/archivesManager_test.go index e6969f5c82557d4e6e39c35efb67c1aedbc2bb14..1b9405d3017958b9a2cd57d66fdac26966055b0a 100644 --- a/dfsst/entities/archivesManager_test.go +++ b/dfsst/entities/archivesManager_test.go @@ -1,11 +1,11 @@ package entities import ( + "crypto/sha512" "fmt" "os" "testing" - "crypto/sha512" cAPI "dfss/dfssc/api" "dfss/mgdb" "github.com/stretchr/testify/assert" diff --git a/dfsst/entities/check_request.go b/dfsst/entities/check_request.go index a5105f08e7aa0ca0d236b0d91cfb3ed00bd1f783..033d8e57f797c4d495da025966df5b7c593c2238 100644 --- a/dfsst/entities/check_request.go +++ b/dfsst/entities/check_request.go @@ -2,9 +2,9 @@ package entities import ( "bytes" + "crypto/sha512" "errors" - "crypto/sha512" "dfss/auth" cAPI "dfss/dfssc/api" pAPI "dfss/dfssp/api" diff --git a/dfsst/resolve/resolve_test.go b/dfsst/resolve/resolve_test.go index 7ee01d678d6127053f8513cb9a6bf501cfea603f..f1b12462200282dd6b5f6ecba422c06047dc4987 100644 --- a/dfsst/resolve/resolve_test.go +++ b/dfsst/resolve/resolve_test.go @@ -1,11 +1,11 @@ package resolve import ( + "crypto/sha512" "fmt" "os" "testing" - "crypto/sha512" cAPI "dfss/dfssc/api" "dfss/dfsst/entities" "dfss/mgdb" diff --git a/dfsst/server/server_test.go b/dfsst/server/server_test.go index 4d3dad9ad9d09cff788883a695fae5b05558d23f..c000a77f43714df98a123a3fd7be3e466d947ee6 100644 --- a/dfsst/server/server_test.go +++ b/dfsst/server/server_test.go @@ -10,12 +10,10 @@ import ( "path/filepath" "testing" - "github.com/spf13/viper" - "dfss/auth" "dfss/dfsst/entities" "dfss/mgdb" - + "github.com/spf13/viper" "gopkg.in/mgo.v2/bson" ) diff --git a/gui/userform/userform.go b/gui/userform/userform.go index 49b79998f97651fe095aa2bb83c65b4972887496..d581cce52f555b1cc2e0c8366357c5a732274554 100644 --- a/gui/userform/userform.go +++ b/gui/userform/userform.go @@ -7,7 +7,6 @@ import ( "dfss/dfssc/user" "dfss/gui/common" "dfss/gui/config" - "github.com/spf13/viper" "github.com/visualfc/goqt/ui" ) diff --git a/mgdb/manager_test.go b/mgdb/manager_test.go index d1bf1c1a2882a93188ea9abc3da0a65078ced4f6..714173ebeaa61b66e97cb1e5ef052acdf272633f 100644 --- a/mgdb/manager_test.go +++ b/mgdb/manager_test.go @@ -2,9 +2,10 @@ package mgdb import ( "fmt" - "gopkg.in/mgo.v2/bson" "os" "testing" + + "gopkg.in/mgo.v2/bson" ) type card struct { diff --git a/mockp/fixtures/authentication.go b/mockp/fixtures/authentication.go index 80ca270dfd8b6a8f534d68c1236ef47aa67846c4..6c0b57d327e9ef0eb4d8797cc9971e1de3219753 100644 --- a/mockp/fixtures/authentication.go +++ b/mockp/fixtures/authentication.go @@ -1,10 +1,10 @@ package fixtures import ( - pb "dfss/dfssp/api" + "dfss/dfssp/api" ) // AuthFixture holds the fixture for the Auth route -var AuthFixture = map[string]*pb.RegisteredUser{ - "default": &pb.RegisteredUser{ClientCert: "default"}, +var AuthFixture = map[string]*api.RegisteredUser{ + "default": &api.RegisteredUser{ClientCert: "default"}, } diff --git a/mockp/server/server.go b/mockp/server/server.go index ef723cc71624d93149efc89177cbe08fb2d71b97..9e11f7412ec3b015823147443951d6fb03179d57 100644 --- a/mockp/server/server.go +++ b/mockp/server/server.go @@ -9,7 +9,6 @@ import ( "dfss/dfssp/api" "dfss/mockp/fixtures" "dfss/net" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/tests/impexp_test.go b/tests/impexp_test.go index ed268b6e4f27d6f8fc22726da986beee186c5c65..c515b37175b9c83449fa5126e05d7b8ac0e6e813 100644 --- a/tests/impexp_test.go +++ b/tests/impexp_test.go @@ -1,7 +1,6 @@ package tests import ( - "dfss/dfssc/common" "io/ioutil" "os" "os/exec" @@ -9,6 +8,7 @@ import ( "strings" "testing" + "dfss/dfssc/common" "github.com/stretchr/testify/assert" )