aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/crypto/openpgp
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2011-04-13 15:12:28 -0400
committerAdam Langley <agl@golang.org>2011-04-13 15:12:28 -0400
commit6392fc75cf5d51f69f9e353da81c84e488dbf629 (patch)
treeb7ef4e1c9bc44297d7849c1a6f1d9169f09906d3 /src/pkg/crypto/openpgp
parent0be2ef3fc474f2716bf60114ddd2a0b481970460 (diff)
downloadgo-6392fc75cf5d51f69f9e353da81c84e488dbf629.tar.xz
bufio: add ReadLine
It matches encoding/line exactly and the tests are copied from there. If we land this, then encoding/line will get marked as deprecated then deleted in time. R=rsc, rog, peterGo CC=golang-dev https://golang.org/cl/4389046
Diffstat (limited to 'src/pkg/crypto/openpgp')
-rw-r--r--src/pkg/crypto/openpgp/armor/armor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/crypto/openpgp/armor/armor.go b/src/pkg/crypto/openpgp/armor/armor.go
index 0c5ae9d716..d695a8c332 100644
--- a/src/pkg/crypto/openpgp/armor/armor.go
+++ b/src/pkg/crypto/openpgp/armor/armor.go
@@ -7,10 +7,10 @@
package armor
import (
+ "bufio"
"bytes"
"crypto/openpgp/error"
"encoding/base64"
- "encoding/line"
"io"
"os"
)
@@ -63,7 +63,7 @@ var armorEndOfLine = []byte("-----")
// lineReader wraps a line based reader. It watches for the end of an armor
// block and records the expected CRC value.
type lineReader struct {
- in *line.Reader
+ in *bufio.Reader
buf []byte
eof bool
crc uint32
@@ -156,7 +156,7 @@ func (r *openpgpReader) Read(p []byte) (n int, err os.Error) {
// given Reader is not usable after calling this function: an arbitary amount
// of data may have been read past the end of the block.
func Decode(in io.Reader) (p *Block, err os.Error) {
- r := line.NewReader(in, 100)
+ r, _ := bufio.NewReaderSize(in, 100)
var line []byte
ignoreNext := false