gnotypes

package
v0.0.0-...-ba0306a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func AdditionalGnoPredeclared

func AdditionalGnoPredeclared() []types.Type

func BuiltinDir

func BuiltinDir() string

BuiltinDir guesses the Gno builtin directory and panics if it fails.

func GnoBuiltin

func GnoBuiltin(includeFn bool) []types.Object

func GuessBuiltinDir

func GuessBuiltinDir() (string, error)

GuessBuiltinDir attempts to determine the Gno builtin directory using various strategies: 1. First, It tries to obtain it from the `GNOBUILTIN` environment variable. 2. If the env variable isn't set, It checks if `_GNOBUILTIN` 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 `GNOBUILTIN` based on the caller stack's file path.

func IsGnoBuiltin

func IsGnoBuiltin(obj types.Object) bool

`IsGnoBuiltin` try to guess if the given object is a gno builtin. XXX: Since we cannot define true Go built-in types, we have to infer them in other ways

Types

This section is empty.

Jump to

Keyboard shortcuts

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