goutil

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 12 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGoVersion added in v1.61.0

func CheckGoVersion(goVersion string) error

func CleanRuntimeVersion added in v1.61.0

func CleanRuntimeVersion() (string, error)

func TrimGoVersion added in v1.61.0

func TrimGoVersion(v string) string

TrimGoVersion Trims the Go version to keep only M.m. Since Go 1.21 the version inside the go.mod can be a patched version (ex: 1.21.0). The version can also include information which we want to remove (ex: 1.21alpha1) https://go.dev/doc/toolchain#versions This a problem with staticcheck and gocritic.

Types

type Env

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

func NewEnv

func NewEnv(log logutils.Log) *Env

func (Env) Discover

func (e Env) Discover(ctx context.Context) error

func (Env) Get

func (e Env) Get(k EnvKey) string

type EnvKey added in v1.19.0

type EnvKey string
const (
	EnvGoCache EnvKey = "GOCACHE"
	EnvGoRoot  EnvKey = "GOROOT"
)

Jump to

Keyboard shortcuts

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