gnoenv

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnableToGuessGnoRoot = errors.New("gno was unable to determine GNOROOT. Please set the GNOROOT environment variable")

Functions

func GuessRootDir

func GuessRootDir() (string, error)

GuessRootDir attempts to determine the Gno root directory using various strategies: 1. First, It tries to obtain it from the `GNOROOT` environment variable. 2. If the env variable isn't set, It checks if `_GNOROOT` has been previously determined or set with -ldflags. 3. If not, it uses the `go list` command to infer from go.mod. 4. As a last resort, it determines `GNOROOT` based on the caller stack's file path.

func HomeDir

func HomeDir() string

func RootDir

func RootDir() string

RootDir guesses the Gno root directory and panics if it fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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