Documentation ¶
Index ¶
Constants ¶
View Source
const ( None = iota Deflate GZ BZip2 LZMA XZ LZ4 Brotli Zstandard )
Compression Algorithm
View Source
const DefaultResponseFile = "compress.rsp.json"
DefaultResponseFile default response file
Variables ¶
View Source
var ( ErrRelativePathEscape = errors.New("relative path escape") ErrResponseFilesField = errors.New("response files field error") )
Error define
Functions ¶
Types ¶
type ExtractOptions ¶
type ExtractOptions struct { OverwriteExisting bool MkdirAll bool IgnoreError bool FilenameEncoding string Password string PassworldCallback func() string ProgressBar io.Writer // contains filtered or unexported fields }
ExtractOptions todo
type File ¶
type File struct { URL string `json:"url,omitempty"` Hash string `json:"hash,omitempty"` Path string `json:"path,omitempty"` Destination string `json:"destination"` Name string `json:"name,omitempty"` // if not exists use filepath.Base Executabled bool `json:"executabled,omitempty"` // when mark executabled. a script create under windows can run linux }
File compress file
type ResponseFile ¶
type ResponseFile struct { Destination string `json:"destination"` CompressLevel int `json:"level,omitempty"` Method string `json:"method,omitempty"` Files []File `json:"files,omitempty"` Dirs []string `json:"dirs,omitempty"` // contains filtered or unexported fields }
ResponseFile todo
func NewResponseFile ¶
func NewResponseFile(src string) (*ResponseFile, error)
NewResponseFile response file
Click to show internal directories.
Click to hide internal directories.