Help us shape the future of Go! Take the 2026 Go Developer Survey

source

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package source implements the `source` and `.` shell built-ins. Reads a script file from c.FS and runs it via c.Exec. Bumps c.SourceDepth + 1 into the SubExecOptions so MaxSourceDepth trips cleanly across nested invocations.

mvdan/sh ships its own; reachable via /bin/source or /bin/. — but The spec specifically lists `source`/`.` as the canonical depth counters, so we route them through c.Exec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDot

func NewDot() command.Command

NewDot returns the `.` command.

func NewSource

func NewSource() command.Command

NewSource returns the `source` command.

func Run

func Run(ctx context.Context, args []string, c *command.Context) command.Result

Run is the shared implementation used by both `source` and `.`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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