utils

package
v0.9.19 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitClone

func GitClone(repo *Repository, targetDir string) error

func GitPull added in v0.6.1

func GitPull(localDir string) error

func LookupInt added in v0.6.1

func LookupInt(key string, fallback int) int

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func RepositoryUrl added in v0.9.19

func RepositoryUrl(pattern string) (*url.URL, error)

Types

type GithubRepo added in v0.6.1

type GithubRepo struct {
	Name            string
	FullName        string `json:"full_name"`
	Description     string
	HtmlUrl         string `json:"html_url"`
	StargazersCount int    `json:"stargazers_count"`
}

func SearchSunbeamExtensions added in v0.6.1

func SearchSunbeamExtensions(query string) ([]GithubRepo, error)

type Release added in v0.9.0

type Release struct {
	TagName string `json:"tag_name"`
}

func GetLatestRelease added in v0.9.0

func GetLatestRelease(repo *Repository) (*Release, error)

type Repository

type Repository struct {
	URL *url.URL
}

func NewRepository added in v0.6.1

func NewRepository(url *url.URL) *Repository

func (*Repository) FullName

func (r *Repository) FullName() string

func (*Repository) Name

func (r *Repository) Name() string

func (*Repository) Owner

func (r *Repository) Owner() string

func (*Repository) String added in v0.9.0

func (r *Repository) String() string

type SearchBody added in v0.6.1

type SearchBody struct {
	Items []GithubRepo
}

Jump to

Keyboard shortcuts

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