Skip to content

Commit 31f8169

Browse files
author
Rob Percival
committed
Make import order consistent
1. golang packages 2. third-party packages 3. packages with aliases 4. _ imports
1 parent c30ff67 commit 31f8169

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

server/trillian_log_server/main.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ import (
2020
"context"
2121
"flag"
2222

23-
// Register key ProtoHandlers
24-
_ "github.com/google/trillian/crypto/keys/der/proto"
25-
_ "github.com/google/trillian/crypto/keys/pem/proto"
26-
_ "github.com/google/trillian/crypto/keys/pkcs11/proto"
27-
"github.com/google/trillian/crypto/keyspb"
28-
2923
"github.com/golang/glog"
3024
"github.com/golang/protobuf/proto"
3125
"github.com/google/trillian"
3226
"github.com/google/trillian/cmd"
3327
"github.com/google/trillian/crypto/keys/der"
28+
"github.com/google/trillian/crypto/keyspb"
3429
"github.com/google/trillian/extension"
3530
"github.com/google/trillian/monitoring"
3631
"github.com/google/trillian/monitoring/prometheus"
@@ -40,13 +35,19 @@ import (
4035
"github.com/google/trillian/util"
4136
"google.golang.org/grpc"
4237

43-
_ "net/http/pprof" // Register pprof HTTP handlers
44-
45-
_ "github.com/go-sql-driver/mysql" // Load MySQL driver
46-
_ "github.com/google/trillian/merkle/objhasher" // Load hashers
47-
_ "github.com/google/trillian/merkle/rfc6962" // Load hashers
48-
4938
mysqlq "github.com/google/trillian/quota/mysql"
39+
40+
// Register pprof HTTP handlers
41+
_ "net/http/pprof"
42+
// Load MySQL driver
43+
_ "github.com/go-sql-driver/mysql"
44+
// Register key ProtoHandlers
45+
_ "github.com/google/trillian/crypto/keys/der/proto"
46+
_ "github.com/google/trillian/crypto/keys/pem/proto"
47+
_ "github.com/google/trillian/crypto/keys/pkcs11/proto"
48+
// Load hashers
49+
_ "github.com/google/trillian/merkle/objhasher"
50+
_ "github.com/google/trillian/merkle/rfc6962"
5051
)
5152

5253
var (

server/trillian_log_signer/main.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ import (
2222
"os"
2323
"time"
2424

25-
// Register key ProtoHandlers
26-
_ "github.com/google/trillian/crypto/keys/der/proto"
27-
_ "github.com/google/trillian/crypto/keys/pem/proto"
28-
_ "github.com/google/trillian/crypto/keys/pkcs11/proto"
29-
3025
"github.com/golang/glog"
3126
"github.com/google/trillian/cmd"
3227
"github.com/google/trillian/extension"
@@ -40,9 +35,15 @@ import (
4035
"github.com/prometheus/client_golang/prometheus/promhttp"
4136
"golang.org/x/net/context"
4237

43-
_ "github.com/go-sql-driver/mysql" // Load MySQL driver
44-
_ "github.com/google/trillian/merkle/objhasher" // Load hashers
45-
_ "github.com/google/trillian/merkle/rfc6962" // Load hashers
38+
// Load MySQL driver
39+
_ "github.com/go-sql-driver/mysql"
40+
// Register key ProtoHandlers
41+
_ "github.com/google/trillian/crypto/keys/der/proto"
42+
_ "github.com/google/trillian/crypto/keys/pem/proto"
43+
_ "github.com/google/trillian/crypto/keys/pkcs11/proto"
44+
// Load hashers
45+
_ "github.com/google/trillian/merkle/objhasher"
46+
_ "github.com/google/trillian/merkle/rfc6962"
4647
)
4748

4849
var (

server/trillian_map_server/main.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ import (
3535

3636
mysqlq "github.com/google/trillian/quota/mysql"
3737

38-
_ "net/http/pprof" // Register pprof HTTP handlers
39-
40-
_ "github.com/go-sql-driver/mysql" // Load MySQL driver
41-
_ "github.com/google/trillian/merkle/coniks" // Make hashers available
42-
_ "github.com/google/trillian/merkle/maphasher" // Make hashers available
43-
38+
// Register pprof HTTP handlers
39+
_ "net/http/pprof"
40+
// Load MySQL driver
41+
_ "github.com/go-sql-driver/mysql"
4442
// Register key ProtoHandlers
4543
_ "github.com/google/trillian/crypto/keys/der/proto"
4644
_ "github.com/google/trillian/crypto/keys/pem/proto"
4745
_ "github.com/google/trillian/crypto/keys/pkcs11/proto"
46+
// Load hashers
47+
_ "github.com/google/trillian/merkle/coniks"
48+
_ "github.com/google/trillian/merkle/maphasher"
4849
)
4950

5051
var (

0 commit comments

Comments
 (0)