action

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentVersion = &Version{}

Functions

func Calc

func Calc(ctx context.Context, proc *query.Processor, expr string) error

func CheckForUpdates

func CheckForUpdates(includePreRelease bool, client GithubClient, goos string, goarch string) (string, error)

func CheckUpdate

func CheckUpdate(includePreRelaese bool) error

func LaunchInteractiveShell

func LaunchInteractiveShell(ctx context.Context, proc *query.Processor) error

func PickVersionNumber

func PickVersionNumber(s string) string

func Run

func Run(ctx context.Context, proc *query.Processor, input string, sourceFile string, outfile string) error

func ShowFields

func ShowFields(ctx context.Context, proc *query.Processor, filename string) error

func Syntax

func Syntax(ctx context.Context, proc *query.Processor, words []string) error

Types

type Client

type Client struct{}

func (Client) GetLatestRelease

func (c Client) GetLatestRelease() (*GithubRelease, error)

func (Client) GetLatestReleaseIncludingPreRelease

func (c Client) GetLatestReleaseIncludingPreRelease() (*GithubRelease, error)

type GithubClient

type GithubClient interface {
	GetLatestRelease() (*GithubRelease, error)
	GetLatestReleaseIncludingPreRelease() (*GithubRelease, error)
}

func NewClient

func NewClient() GithubClient

type GithubRelease

type GithubRelease struct {
	HTMLURL     string               `json:"html_url"`
	TagName     string               `json:"tag_name"`
	PublishedAt string               `json:"published_at"`
	Assets      []GithubReleaseAsset `json:"assets"`
}

type GithubReleaseAsset

type GithubReleaseAsset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
}

type Version

type Version struct {
	Major      int
	Minor      int
	Patch      int
	PreRelease int
}

func ParseVersion

func ParseVersion(s string) (*Version, error)

func (*Version) IsEmpty

func (v *Version) IsEmpty() bool

func (*Version) IsLaterThan

func (v *Version) IsLaterThan(v2 *Version) bool

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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