xpm

package module
v0.0.0-...-057e534 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountIEC

func ByteCountIEC(b int64) string

ByteCountIEC convert byte to human readable string

func DownloadAndSave

func DownloadAndSave(url string, prefix string, filename string) error

DownloadAndSave Download a file from url and save it to prefix/filename

func GetResponseWithHeader

func GetResponseWithHeader(url string) (string, error)

GetResponseWithHeader Get the response from the url with proper headers

func Install

func Install(p string, v string, c []string, prefix string) error

Install p@v in configuration c at prefix

func InstallPackage

func InstallPackage(p XPackage, v string, prefix string) error

InstallPackage with version v

Types

type XImgui

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

XImgui package script

func (*XImgui) GetCurrentVersion

func (x *XImgui) GetCurrentVersion(prefix string) string

GetCurrentVersion of XImgui

func (*XImgui) GetRemoteVersion

func (x *XImgui) GetRemoteVersion(version string) (string, error)

GetRemoteVersion of XImgui

func (XImgui) UpdateFiles

func (x XImgui) UpdateFiles(prefix string) error

UpdateFiles of XImgui

type XPackage

type XPackage interface {
	GetRemoteVersion(string) (string, error)
	GetCurrentVersion(string) string
	UpdateFiles(string) error
}

XPackage interface

Jump to

Keyboard shortcuts

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