utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean added in v0.2.0

func Clean(versions []string)

Clean Removes passed versions

func Get

func Get(url string) ([]byte, error)

Get Base implementation of request

func IsOldLinuxVersion

func IsOldLinuxVersion(version string) bool

IsOldLinuxVersion Determines if the compiler version for Linux is old

Older versions are available at a different address

func IsOldWindowsVersion

func IsOldWindowsVersion(version string) bool

IsOldWindowsVersion Determines if the compiler version for Windows is old

Older versions have a different file structure

func Unzip

func Unzip(folder string, data []byte) error

Unzip Decompresses a file to a specific folder, returns an error on failure during decompression

func VerifyChecksum

func VerifyChecksum(k256 string, s256 string, data []byte) error

VerifyChecksum Checks the checksum of the received file, returns an error if the sum is incorrect

Types

type BuildData

type BuildData struct {
	Path      string `json:"path"`
	Name      string `json:"name"`
	Version   string `json:"version"`
	Keccak256 string `json:"keccak256"`
	Sha256    string `json:"sha256"`
}

type ResponseData

type ResponseData struct {
	Releases map[string]string `json:"releases"`
	Builds   []*BuildData      `json:"builds"`
}

Jump to

Keyboard shortcuts

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