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

let

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: 7 Imported by: 0

Documentation

Overview

Package let implements the `let` shell built-in.

`let EXPR...` evaluates each arithmetic expression. The exit code is 0 if the last result is non-zero, 1 if it is zero (matching bash).

This is a self-contained mini arithmetic evaluator supporting integer arithmetic with +, -, *, /, %, parentheses, unary -, and simple assignments `name=expr`. Variables resolve through c.Env and assignments mutate c.Env. Expressions richer than this fall back to "0" and exit 1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() command.Command

New returns the let command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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