From e7e638f095032baa83ec37e3526ca41532e76276 Mon Sep 17 00:00:00 2001 From: alexmullins Date: Thu, 29 Oct 2015 17:15:39 -0500 Subject: [PATCH] change reader exmple to show usage of SetPassword --- example_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example_test.go b/example_test.go index c2ed9e7..4025f5b 100644 --- a/example_test.go +++ b/example_test.go @@ -5,12 +5,13 @@ package zip_test import ( - "archive/zip" "bytes" "fmt" "io" "log" "os" + + "github.com/alexmullins/zip" ) func ExampleWriter() { @@ -57,6 +58,9 @@ func ExampleReader() { // Iterate through the files in the archive, // printing some of their contents. for _, f := range r.File { + // if f.IsEncrypted() { + // f.SetPassword([]byte("password")) + // } fmt.Printf("Contents of %s:\n", f.Name) rc, err := f.Open() if err != nil {