Documentation ¶
Index ¶
- func ChangeModeIfNot(src string, mode os.FileMode) error
- func CompareVersion(v1, v2 string) int
- func CopyFile(src, dst string) error
- func FileExists(filename string) bool
- func GetBeginOfToday() int64
- func GetTimestamp() int64
- func IsBeforeToday(timestamp int64) bool
- func IsExecutable(src string) bool
- func MkSymlink(oldname, newname string) (err error)
- func MoveFiles(src, targetDir string) error
- type ArchType
- type Bzip2TarDecompressor
- type Decompressor
- type Downloader
- type ErrorStore
- type GzipTarDecompressor
- type MapSet
- type OSType
- type Set
- type SevenZipDecompressor
- type SortedSet
- type VersionSort
- type XZTarDecompressor
- type ZipDecompressor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeModeIfNot ¶ added in v0.4.0
ChangeModeIfNot Change the permission mode of a file if it is not the same as the specified mode
func CompareVersion ¶
func FileExists ¶
func GetBeginOfToday ¶
func GetBeginOfToday() int64
func GetTimestamp ¶
func GetTimestamp() int64
func IsBeforeToday ¶
func IsExecutable ¶ added in v0.5.0
IsExecutable Check if a file is executable
Types ¶
type Bzip2TarDecompressor ¶ added in v0.6.0
type Bzip2TarDecompressor struct {
// contains filtered or unexported fields
}
func (*Bzip2TarDecompressor) Decompress ¶ added in v0.6.0
func (b *Bzip2TarDecompressor) Decompress(dest string) error
type Decompressor ¶
func NewDecompressor ¶
func NewDecompressor(src string) Decompressor
type Downloader ¶
type Downloader struct { // URL is the URL to download the SDK from. LocalPath string `json:"local_path"` }
func NewDownloader ¶
func NewDownloader(localPath string) *Downloader
type ErrorStore ¶ added in v0.4.2
type ErrorStore struct {
// contains filtered or unexported fields
}
ErrorStore is a struct that stores errors
func NewErrorStore ¶ added in v0.4.2
func NewErrorStore() *ErrorStore
NewErrorStore creates a new ErrorStore
func (*ErrorStore) Add ¶ added in v0.4.2
func (e *ErrorStore) Add(note string, err error)
Add adds an error to the store
func (*ErrorStore) AddAndShow ¶ added in v0.4.2
func (e *ErrorStore) AddAndShow(note string, err error)
Add and show in the console
func (*ErrorStore) GetNotes ¶ added in v0.4.2
func (e *ErrorStore) GetNotes() []string
get all error notes
func (*ErrorStore) GetNotesSet ¶ added in v0.4.2
func (e *ErrorStore) GetNotesSet() Set[string]
get notes set
func (*ErrorStore) HasError ¶ added in v0.4.2
func (e *ErrorStore) HasError() bool
type GzipTarDecompressor ¶
type GzipTarDecompressor struct {
// contains filtered or unexported fields
}
func (*GzipTarDecompressor) Decompress ¶
func (g *GzipTarDecompressor) Decompress(dest string) error
type MapSet ¶ added in v0.2.5
type MapSet[T comparable] struct { // contains filtered or unexported fields }
type Set ¶ added in v0.2.5
type Set[T comparable] interface { Add(v T) bool Remove(v T) Contains(v T) bool Len() int Slice() []T }
func NewSet ¶ added in v0.2.5
func NewSet[T comparable]() Set[T]
func NewSetWithSlice ¶ added in v0.2.5
func NewSetWithSlice[T comparable](slice []T) Set[T]
func NewSortedSetWithSlice ¶ added in v0.2.5
func NewSortedSetWithSlice[T comparable](slice []T) Set[T]
type SevenZipDecompressor ¶ added in v0.3.2
type SevenZipDecompressor struct {
// contains filtered or unexported fields
}
func (*SevenZipDecompressor) Decompress ¶ added in v0.3.2
func (s *SevenZipDecompressor) Decompress(dest string) error
type SortedSet ¶ added in v0.2.5
type SortedSet[T comparable] struct { // contains filtered or unexported fields }
func NewSortedSet ¶ added in v0.2.5
func NewSortedSet[T comparable]() *SortedSet[T]
func (*SortedSet[T]) AddWithIndex ¶ added in v0.5.0
type VersionSort ¶ added in v0.4.0
type VersionSort []string
func (VersionSort) Len ¶ added in v0.4.0
func (s VersionSort) Len() int
func (VersionSort) Less ¶ added in v0.4.0
func (s VersionSort) Less(i, j int) bool
func (VersionSort) Swap ¶ added in v0.4.0
func (s VersionSort) Swap(i, j int)
type XZTarDecompressor ¶
type XZTarDecompressor struct {
// contains filtered or unexported fields
}
func (*XZTarDecompressor) Decompress ¶
func (g *XZTarDecompressor) Decompress(dest string) error
type ZipDecompressor ¶
type ZipDecompressor struct {
// contains filtered or unexported fields
}
func (*ZipDecompressor) Decompress ¶
func (z *ZipDecompressor) Decompress(dest string) error
Click to show internal directories.
Click to hide internal directories.