Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

fix: fix various linting errors #257

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/duffle/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path/filepath"
"testing"

"github.com/deis/duffle/pkg/bundle"
"github.com/stretchr/testify/assert"

"github.com/deis/duffle/pkg/bundle"
"github.com/deis/duffle/pkg/duffle/home"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/bundle/parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ func TestConvertValue(t *testing.T) {
is.NoError(err)
is.Equal(123, out.(int))

out, err = pd.ConvertValue("onetwothree")
_, err = pd.ConvertValue("onetwothree")
is.Error(err)
}

Expand Down
4 changes: 0 additions & 4 deletions pkg/signature/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ func (k *Key) findPrivateKey() (*packet.PrivateKey, error) {
return nil, errors.New("no signing key found")
}

func canSign(k *openpgp.Key) bool {
return k.SelfSignature.FlagSign
}

// KeyRing represents a collection of keys as specified by OpenPGP
type KeyRing struct {
entities openpgp.EntityList
Expand Down
1 change: 1 addition & 0 deletions pkg/signature/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func TestSigner_Attest(t *testing.T) {
// Sign the bundle twice and make sure the sigs are the same.
s := NewSigner(k)
sig, err := s.Clearsign(b)
is.NoError(err)
attestation, err := s.Attest(sig)
is.NoError(err)
is.Contains(string(sig), string(attestation))
Expand Down
3 changes: 2 additions & 1 deletion pkg/signature/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"bytes"
"encoding/json"

"github.com/deis/duffle/pkg/bundle"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/clearsign"

"github.com/deis/duffle/pkg/bundle"
)

// Verifier provides tools to verify a signed bundle.
Expand Down