util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersion added in v0.1.0

func CompareVersion(v1, v2 string) int

func CopyFile added in v0.1.0

func CopyFile(src, dst string) error

func FileExists

func FileExists(filename string) bool

Types

type ArchType

type ArchType string
const (
	AMD64 ArchType = "amd64"
	ARM64 ArchType = "arm64"
)

func GetArchType

func GetArchType() ArchType

type Decompressor

type Decompressor interface {
	Decompress(dest string) error
}

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

func (*Downloader) Download

func (d *Downloader) Download(url *url.URL) (string, error)

type GzipTarDecompressor

type GzipTarDecompressor struct {
	// contains filtered or unexported fields
}

func (*GzipTarDecompressor) Decompress

func (g *GzipTarDecompressor) Decompress(dest string) error

type OSType

type OSType string
const (
	MacOS   OSType = "darwin"
	Windows OSType = "windows"
	Linux   OSType = "linux"
)

func GetOSType

func GetOSType() OSType

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

Jump to

Keyboard shortcuts

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