runtimego

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, fSys fsh.FS, binToolDir, ver string) error

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func Discover

func Discover(ctx context.Context, fSys fsh.FS, binToolDir string) ([]*Runtime, error)

Discover will find all supported golang runtimes. It can be: - global installation - local ./bin/tools installation

func New

func New(fs fsh.FS, binToolDir, goBin, goVer string) *Runtime

func (*Runtime) GetLatest

func (r *Runtime) GetLatest(ctx context.Context, moduleReq string) (string, bool, error)

func (*Runtime) GetModule

func (r *Runtime) GetModule(ctx context.Context, module string) (*structs.ModuleInfo, error)

func (*Runtime) Install

func (r *Runtime) Install(ctx context.Context, program string) error

func (*Runtime) Parse

func (r *Runtime) Parse(ctx context.Context, str string) (string, error)

Parse will parse string to normal version. github.com/kazhuravlev/toolset/cmd/toolset@latest github.com/kazhuravlev/toolset/cmd/toolset github.com/kazhuravlev/toolset/cmd/toolset@v4.2

func (*Runtime) Remove

func (r *Runtime) Remove(ctx context.Context, tool structs.Tool) error

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context, program string, args ...string) error

func (*Runtime) Version

func (r *Runtime) Version() string

Jump to

Keyboard shortcuts

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