Skip to content

Commit 98ad13f

Browse files
committed
fix: all linter errors
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent fb31850 commit 98ad13f

File tree

46 files changed

+58
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+58
-54
lines changed

cli/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"os"
88
"strings"
99

10+
"github.com/aperturerobotics/bifrost/crypto"
1011
bifrost_api "github.com/aperturerobotics/bifrost/daemon/api"
1112
"github.com/aperturerobotics/bifrost/peer"
1213
peer_controller "github.com/aperturerobotics/bifrost/peer/controller"
@@ -19,7 +20,6 @@ import (
1920
"github.com/aperturerobotics/cli"
2021
cbus_cli "github.com/aperturerobotics/controllerbus/cli"
2122
"github.com/aperturerobotics/starpc/srpc"
22-
"github.com/aperturerobotics/bifrost/crypto"
2323
)
2424

2525
// ClientArgs contains the client arguments and functions.

cli/envelope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"math"
88
"os"
99

10+
"github.com/aperturerobotics/bifrost/crypto"
1011
"github.com/aperturerobotics/bifrost/envelope"
1112
"github.com/aperturerobotics/bifrost/keypem"
1213
"github.com/aperturerobotics/bifrost/keypem/keyfile"
1314
"github.com/aperturerobotics/cli"
14-
"github.com/aperturerobotics/bifrost/crypto"
1515
"github.com/pkg/errors"
1616
"github.com/sirupsen/logrus"
1717
)

crypto/crypto.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"encoding/base64"
1515
"io"
1616

17-
"github.com/aperturerobotics/protobuf-go-lite"
17+
protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
1818
"github.com/pkg/errors"
1919
)
2020

crypto/tls/tls.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ import (
2727
"github.com/pkg/errors"
2828
)
2929

30-
const certValidityPeriod = 100 * 365 * 24 * time.Hour // ~100 years
31-
const certificatePrefix = "libp2p-tls-handshake:"
30+
const (
31+
certValidityPeriod = 100 * 365 * 24 * time.Hour // ~100 years
32+
certificatePrefix = "libp2p-tls-handshake:"
33+
)
3234

33-
var extensionID = getPrefixedExtensionID([]int{1, 1})
34-
var extensionCritical bool // so we can mark the extension critical in tests
35+
var (
36+
extensionID = getPrefixedExtensionID([]int{1, 1})
37+
extensionCritical bool // so we can mark the extension critical in tests
38+
)
3539

3640
type signedKey struct {
3741
PubKey []byte
@@ -90,7 +94,7 @@ func NewIdentity(privKey crypto.PrivKey, opts ...IdentityOption) (*Identity, err
9094
return &Identity{
9195
config: tls.Config{
9296
MinVersion: tls.VersionTLS13,
93-
InsecureSkipVerify: true, // Not insecure: we verify the cert chain ourselves.
97+
InsecureSkipVerify: true, //nolint:gosec // Not insecure: we verify the cert chain ourselves.
9498
ClientAuth: tls.RequireAnyClientCert,
9599
Certificates: []tls.Certificate{*cert},
96100
VerifyPeerCertificate: func(_ [][]byte, _ [][]*x509.Certificate) error {

daemon/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
"github.com/aperturerobotics/bifrost/core"
7+
"github.com/aperturerobotics/bifrost/crypto"
78
api_controller "github.com/aperturerobotics/bifrost/daemon/api/controller"
89
"github.com/aperturerobotics/bifrost/keypem"
910
"github.com/aperturerobotics/bifrost/peer"
@@ -13,7 +14,6 @@ import (
1314
"github.com/aperturerobotics/controllerbus/controller/loader"
1415
"github.com/aperturerobotics/controllerbus/controller/resolver"
1516
"github.com/aperturerobotics/controllerbus/controller/resolver/static"
16-
"github.com/aperturerobotics/bifrost/crypto"
1717
"github.com/sirupsen/logrus"
1818
)
1919

envelope/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55
"encoding/hex"
66
"io"
77

8+
"github.com/aperturerobotics/bifrost/crypto"
89
"github.com/aperturerobotics/bifrost/keypem"
910
"github.com/aperturerobotics/bifrost/peer"
1011
"github.com/aperturerobotics/util/scrub"
1112
"github.com/cloudflare/circl/group"
1213
"github.com/cloudflare/circl/secretsharing"
13-
"github.com/aperturerobotics/bifrost/crypto"
1414
"github.com/zeebo/blake3"
1515
"golang.org/x/crypto/chacha20poly1305"
1616
)

envelope/unlock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import (
44
"bytes"
55
"encoding/hex"
66

7+
"github.com/aperturerobotics/bifrost/crypto"
78
"github.com/aperturerobotics/bifrost/peer"
89
"github.com/aperturerobotics/util/scrub"
910
"github.com/cloudflare/circl/group"
1011
"github.com/cloudflare/circl/secretsharing"
11-
"github.com/aperturerobotics/bifrost/crypto"
1212
"golang.org/x/crypto/chacha20poly1305"
1313
)
1414

examples/udp-link/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import (
66
"net"
77
"sync"
88

9+
crypto "github.com/aperturerobotics/bifrost/crypto"
910
"github.com/aperturerobotics/bifrost/daemon"
1011
link_holdopen_controller "github.com/aperturerobotics/bifrost/link/hold-open"
1112
"github.com/aperturerobotics/bifrost/peer"
1213
tptc "github.com/aperturerobotics/bifrost/transport/controller"
1314
udptpt "github.com/aperturerobotics/bifrost/transport/udp"
1415
"github.com/aperturerobotics/controllerbus/controller/loader"
1516
"github.com/aperturerobotics/controllerbus/controller/resolver"
16-
crypto "github.com/aperturerobotics/bifrost/crypto"
1717
"github.com/pkg/errors"
1818
"github.com/sirupsen/logrus"
1919
)

examples/webrtc-browser-http/browser/index.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/aperturerobotics/bifrost/core"
13+
"github.com/aperturerobotics/bifrost/crypto"
1314
"github.com/aperturerobotics/bifrost/keypem"
1415
"github.com/aperturerobotics/bifrost/link"
1516
"github.com/aperturerobotics/bifrost/peer"
@@ -24,7 +25,6 @@ import (
2425
"github.com/aperturerobotics/controllerbus/bus"
2526
"github.com/aperturerobotics/controllerbus/controller/resolver"
2627
"github.com/aperturerobotics/controllerbus/directive"
27-
"github.com/aperturerobotics/bifrost/crypto"
2828
"github.com/sirupsen/logrus"
2929
)
3030

examples/websocket-browser-link/common/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package common
33
import (
44
"context"
55

6+
"github.com/aperturerobotics/bifrost/crypto"
67
"github.com/aperturerobotics/bifrost/keypem"
78
link_holdopen_controller "github.com/aperturerobotics/bifrost/link/hold-open"
89
"github.com/aperturerobotics/bifrost/peer"
@@ -14,7 +15,6 @@ import (
1415
"github.com/aperturerobotics/controllerbus/controller/resolver/static"
1516
"github.com/aperturerobotics/controllerbus/core"
1617
"github.com/aperturerobotics/controllerbus/directive"
17-
"github.com/aperturerobotics/bifrost/crypto"
1818
"github.com/sirupsen/logrus"
1919
)
2020

0 commit comments

Comments
 (0)