ziputil

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2020 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

Package ziputil provides some utility functions for zip archive handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StoreFile

func StoreFile(z *zip.Writer, filename string, src io.WriterTo) error

StoreFile is similar to WriteFile except it uses Store instead of Deflate.

func WriteFile

func WriteFile(z *zip.Writer, filename string, src io.WriterTo) error

WriteFile writes a single file inside a zip archive.

Types

type StringWriterTo

type StringWriterTo string

StringWriterTo wraps string into io.WriterTo.

func (StringWriterTo) WriteTo

func (s StringWriterTo) WriteTo(w io.Writer) (int64, error)

WriteTo implements io.WriterTo.

type WriterToWrapper

type WriterToWrapper func(w io.Writer) (int64, error)

WriterToWrapper helps wrapping lambdas into io.WriterTo.

func (WriterToWrapper) WriteTo

func (w WriterToWrapper) WriteTo(writer io.Writer) (int64, error)

WriteTo implements io.WriterTo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL