stdlib

package
v2.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() runtime.Namespace

New creates a new standard library. It registers all available functions and namespaces to the root namespace and returns it.

func RegisterLib

func RegisterLib(ns runtime.Namespace)

Types

type Group

type Group string

Group identifies a standard library capability group.

const (
	Types       Group = "types"
	Strings     Group = "strings"
	Math        Group = "math"
	Collections Group = "collections"
	DateTime    Group = "datetime"
	Arrays      Group = "arrays"
	Objects     Group = "objects"
	IO          Group = "io"
	FS          Group = "fs"
	NET         Group = "net"
	Path        Group = "path"
	Utils       Group = "utils"
	Testing     Group = "testing"
)

type Set

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

Set is an immutable selection of standard library capability groups.

func Empty

func Empty() Set

Empty returns a set containing no standard library groups.

func Full

func Full() Set

Full returns a set containing every standard library group.

func Only

func Only(groups ...Group) Set

Only returns a set containing only the provided standard library groups.

func Safe

func Safe() Set

Safe returns the full standard library without filesystem or network groups.

func (Set) Register

func (s Set) Register(ns runtime.Namespace) error

Register registers the selected standard library groups into the namespace.

func (Set) With

func (s Set) With(groups ...Group) Set

With returns a new set that also contains the provided groups.

func (Set) Without

func (s Set) Without(groups ...Group) Set

Without returns a new set without the provided groups.

Directories

Path Synopsis
io
fs
net

Jump to

Keyboard shortcuts

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