cli

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Logkit      = "logkit"
	GoosWindows = "windows"
	GoosLinux   = "Linux"
	GoosMac     = "Darwin"
	Arch386     = "386"
	Arch64      = "amd64"

	UserAgent          = "User-Agent"
	RateLimitReset     = "X-RateLimit-Reset"
	RateLimitRemaining = "X-RateLimit-Remaining"
)

Variables

View Source
var LastVersionUrl = "https://api.github.com/repos/qiniu/logkit/releases/latest"

为了测试,将这个声明为变量,但是不要修改

Functions

func CheckAndUpgrade

func CheckAndUpgrade(curVersion string)

Types

type CliVersion

type CliVersion struct {
	Major    int
	Minor    int
	Revision int
}

type ReleaseInfo

type ReleaseInfo struct {
	Url    string `json:"url"`  // api 请求地址
	Name   string `json:"name"` // version
	Body   string `json:"body"` // 更新内容
	Assets []struct {
		DownloadUrl string `json:"browser_download_url"` // 压缩包下载链接
		PackageName string `json:"name"`                 // 压缩包名称
		ContentType string `json:"content_type"`         // 类型 zip/gzip
		FileSize    int64  `json:"size"`                 // 文件大小
	} `json:"assets"`
}

Jump to

Keyboard shortcuts

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