to write our archive to.</span>
buf := new(bytes.Buffer)
<span class="com">// Create a new zip archive.</span>
w := zip.NewWriter(buf)
<span class="com">// Add some files to the archive.</span>
var files = []struct {
    Name, Body string
}{
    {&#34;readme.txt&#34;, &#34;This archive contains some text files.&#34;},
    {&#34;gopher.txt&#34;, &#34;Gopher names:\nGeorge\nGeoffrey\nGonzo&#34;},
    {&#34;todo.txt&#34;, &#34;Get animal handling licence.\nWrite more examples.&#34;},
}
for _, file := range fil