goutil

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGoVersion

func CheckGoVersion(goVersion string) error

func CleanRuntimeVersion

func CleanRuntimeVersion() (string, error)

func TrimGoVersion

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

type EnvKey string

Jump to

Keyboard shortcuts

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