Skip to content

Commit 72616bc

Browse files
Merge pull request #18 from spiegel-im-spiegel/support-rfc4880bis
Fix buf for parsing secret key packet
2 parents 462df46 + 97b4897 commit 72616bc

23 files changed

+387
-227
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22

33
go:
4-
- "1.10"
4+
- "1.10.x"
55

66
env:
77
- DEP_VERSION="0.4.1"

Gopkg.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[[constraint]]
66
name = "github.com/spiegel-im-spiegel/gocli"
7-
version = "0.5.*"
7+
version = "0.8.*"
88

99
[[constraint]]
1010
name = "github.com/pkg/errors"

cli/gpgpdump/facade/armor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestArmorNormal(t *testing.T) {
1212
inData := bytes.NewBufferString(ascdata1)
1313
outBuf := new(bytes.Buffer)
1414
outErrBuf := new(bytes.Buffer)
15-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
15+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
1616
args := []string{"-a", "-u"}
1717

1818
exit := Execute(ui, args)
@@ -33,7 +33,7 @@ func TestArmorErr(t *testing.T) {
3333
inData := bytes.NewReader(bindata1)
3434
outBuf := new(bytes.Buffer)
3535
outErrBuf := new(bytes.Buffer)
36-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
36+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
3737
args := []string{"-a"}
3838

3939
exit := Execute(ui, args)

cli/gpgpdump/facade/exitcode.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

cli/gpgpdump/facade/exitcode_test.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

cli/gpgpdump/facade/facade_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestLoadByStdin(t *testing.T) {
5252
inData := bytes.NewReader(bindata1)
5353
outBuf := new(bytes.Buffer)
5454
outErrBuf := new(bytes.Buffer)
55-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
55+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
5656
args := []string{}
5757

5858
exit := Execute(ui, args)
@@ -73,7 +73,7 @@ func TestLoadByNosata(t *testing.T) {
7373
inData := bytes.NewReader([]byte{})
7474
outBuf := new(bytes.Buffer)
7575
outErrBuf := new(bytes.Buffer)
76-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
76+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
7777
args := []string{}
7878

7979
exit := Execute(ui, args)
@@ -93,7 +93,7 @@ func TestLoadByNosata(t *testing.T) {
9393
func TestLoadByFile(t *testing.T) {
9494
outBuf := new(bytes.Buffer)
9595
outErrBuf := new(bytes.Buffer)
96-
ui := rwi.New(rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
96+
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
9797
args := []string{"testdata/bindata1"}
9898

9999
exit := Execute(ui, args)
@@ -113,7 +113,7 @@ func TestLoadByFile(t *testing.T) {
113113
func TestLoadByNofile(t *testing.T) {
114114
outBuf := new(bytes.Buffer)
115115
outErrBuf := new(bytes.Buffer)
116-
ui := rwi.New(rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
116+
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
117117
args := []string{"noexist"}
118118

119119
exit := Execute(ui, args)

cli/gpgpdump/facade/json_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestJsonOn(t *testing.T) {
6464
inData := bytes.NewReader(bindata1)
6565
outBuf := new(bytes.Buffer)
6666
outErrBuf := new(bytes.Buffer)
67-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
67+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
6868
args := []string{"-j"}
6969

7070
exit := Execute(ui, args)

cli/gpgpdump/facade/options_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestOptionsNormal(t *testing.T) {
1212
inData := bytes.NewReader(bindata1)
1313
outBuf := new(bytes.Buffer)
1414
outErrBuf := new(bytes.Buffer)
15-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
15+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
1616
args := []string{"-i", "-l", "-m", "-p", "-u", "--debug"}
1717

1818
exit := Execute(ui, args)
@@ -25,7 +25,7 @@ func TestOptionsAbnormal(t *testing.T) {
2525
inData := bytes.NewReader(bindata1)
2626
outBuf := new(bytes.Buffer)
2727
outErrBuf := new(bytes.Buffer)
28-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
28+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
2929
args := []string{"-d"}
3030

3131
exit := Execute(ui, args)

cli/gpgpdump/facade/toml_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func TestTOMLLoadByStdin(t *testing.T) {
115115
inData := bytes.NewReader(binTOMLdata1)
116116
outBuf := new(bytes.Buffer)
117117
outErrBuf := new(bytes.Buffer)
118-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
118+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
119119
args := []string{"-t"}
120120

121121
exit := Execute(ui, args)
@@ -136,7 +136,7 @@ func TestTOMLLoadByNosata(t *testing.T) {
136136
inData := bytes.NewReader([]byte{})
137137
outBuf := new(bytes.Buffer)
138138
outErrBuf := new(bytes.Buffer)
139-
ui := rwi.New(rwi.Reader(inData), rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
139+
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
140140
args := []string{"-t"}
141141

142142
exit := Execute(ui, args)
@@ -156,7 +156,7 @@ func TestTOMLLoadByNosata(t *testing.T) {
156156
func TestTOMLLoadByFile(t *testing.T) {
157157
outBuf := new(bytes.Buffer)
158158
outErrBuf := new(bytes.Buffer)
159-
ui := rwi.New(rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
159+
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
160160
args := []string{"-t", "testdata/bindata1"}
161161

162162
exit := Execute(ui, args)
@@ -176,7 +176,7 @@ func TestTOMLLoadByFile(t *testing.T) {
176176
func TestTOMLLoadByNofile(t *testing.T) {
177177
outBuf := new(bytes.Buffer)
178178
outErrBuf := new(bytes.Buffer)
179-
ui := rwi.New(rwi.Writer(outBuf), rwi.ErrorWriter(outErrBuf))
179+
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
180180
args := []string{"-t", "noexist"}
181181

182182
exit := Execute(ui, args)

0 commit comments

Comments
 (0)