ango

package module
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 12 Imported by: 0

README

AnGo

Update all of GOBIN.

AnGo provides an easy way to manage your GOBIN. You can install module with -trimpath and -ldflags flags, and automatically update them.

Usage

Install by go:

go install -v -trimpath -ldflags "-w -s -buildid=" github.com/xchacha20-poly1305/ango/cmd/ango@latest

Build:

make build

command:

Usage of ango:
  -V	Print version.
  -d	Dry run. Just check update.
  -ldflags string
    	 (default "-s -w")
  -r	Re-install all binaries.
  -trimpath
    	 (default true)
  -v	Show verbose info. And append -v flag to go install

Credits

Documentation

Index

Constants

View Source
const (
	LatestVersionAPI = "https://proxy.golang.org/%s/@latest"
	VersionListAPI   = "https://proxy.golang.org/%s/@v/list"
)

Variables

View Source
var UserAgent string

Functions

func LatestVersion

func LatestVersion(ctx context.Context, httpClient *http.Client, module string) (version gvgo.Parsed, err error)

LatestVersion returns the latest version of module. httpClient is optional.

func RunUpdate

func RunUpdate(path string, stdout, stderr io.Writer, args []string) error

RunUpdate uses `go install` command to update GOBIN.

path should a go module path, like golang.org/dl/go1.22.5@latest

stdout and stderr is optional.

func UnstableVersion

func UnstableVersion(ctx context.Context, httpClient *http.Client, module string) (version gvgo.Parsed, err error)

UnstableVersion gets the test version. If not have test version, it will return the latest version. httpClient is optional.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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