Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBufferSize = 5 << 20
DefaultBufferSize defines a default buffer size for reading and writing the archives.
Variables ¶
View Source
var (
Cmd = &cobra.Command{
Use: "pack",
RunE: archiveCmdRun,
}
)
Functions ¶
This section is empty.
Types ¶
type CompressionType ¶
type CompressionType int
CompressionType defines a custom type the represents a compression type value.
const ( NoCompression CompressionType = iota Gzip Zstd )
func (CompressionType) Extension ¶
func (ct CompressionType) Extension() string
Extension returns the archive name extension representing the compression type.
func (CompressionType) FromString ¶
func (ct CompressionType) FromString(s string) CompressionType
FromString resolves and returns the CompressionType value from the provided string. If string value is unknows or invalid the NoCompression will be used.
func (CompressionType) Writer ¶
func (ct CompressionType) Writer(w io.Writer) (io.WriteCloser, error)
Click to show internal directories.
Click to hide internal directories.