https://golang.org/pkg/archive/zip/
Пример с одним файлом:
func handle(w http.ResponseWriter, r *http.Request){
fileToZip, _ := os.Open("filepath")
defer fileToZip.Close()
// NewWriter returns a new Writer writing a zip file to w.
zipWriter := zip.NewWriter(w)
defer zipWriter.Close()
info, _ := fileToZip.Stat()
header, _ := zip.FileInfoHeader(info)
// Change to deflate to gain better compression
// see http://golang.org/pkg/archive/zip/#pkg-constants
header.Method = zip.Deflate
// CreateHeader adds a file to the zip archive using the provided FileHeader
// for the file metadata.
// This returns a Writer to which the file contents should be written.
writer, _ := zipWriter.CreateHeader(header)
io.Copy(writer, fileToZip)
}