mirror of
https://github.com/golang/go
synced 2024-11-12 06:20:22 -07:00
crypto/cipher: fix vet warning
R=golang-dev, r CC=golang-dev https://golang.org/cl/7973043
This commit is contained in:
parent
ebb1714fe7
commit
dabe51065c
@ -233,7 +233,7 @@ func ExampleStreamReader() {
|
||||
}
|
||||
defer outFile.Close()
|
||||
|
||||
reader := &cipher.StreamReader{stream, inFile}
|
||||
reader := &cipher.StreamReader{S: stream, R: inFile}
|
||||
// Copy the input file to the output file, decrypting as we go.
|
||||
if _, err := io.Copy(outFile, reader); err != nil {
|
||||
panic(err)
|
||||
@ -270,7 +270,7 @@ func ExampleStreamWriter() {
|
||||
}
|
||||
defer outFile.Close()
|
||||
|
||||
writer := &cipher.StreamWriter{stream, outFile, nil}
|
||||
writer := &cipher.StreamWriter{S: stream, W: outFile}
|
||||
// Copy the input file to the output file, encrypting as we go.
|
||||
if _, err := io.Copy(writer, inFile); err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user