github

package
v0.0.0-...-9c55465 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentHost = "https://raw.githubusercontent.com"
	// ContentURLTpl eg: https://raw.githubusercontent.com/gookit/slog/master/README.md
	ContentURLTpl = "https://raw.githubusercontent.com/%s/%s/%s"
)

Variables

This section is empty.

Functions

func ContentURL

func ContentURL(repoPath, branch, filePath string) string

ContentURL for GitHub repo file

Types

type GitHub

type GitHub struct {
	*gitx.Config

	// GitHub 文件, Releases, archive, gist, raw.githubusercontent.com 文件代理加速下载服务.
	// eg: https://ghproxy.com
	ProxyHost string `json:"proxy_host"`
	// Username on https://github.com
	Username string `json:"username"`
	// Token person token.
	Token string `json:"token"`
	// BaseApi api url
	BaseApi string `json:"base_api"`
}

GitHub config struct

func New

func New(cfg *gitx.Config) *GitHub

New config instance

Jump to

Keyboard shortcuts

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