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 MoveFiles(src, targetDir string) error
- type ArchType
- type Decompressor
- type Downloader
- 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 ¶
Types ¶
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 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 NewSortedSet ¶ added in v0.2.5
func NewSortedSet[T comparable]() 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 }
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.