cmd

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocCommand added in v1.18.0

func DocCommand(opts ...Option) *cobra.Command

DocCommand creates the "doc" cobra command with optional embedder configuration. Embedders can pass WithEnv to supply a fully configured environment (preferred) or WithRegistry to merge Go-registered packages into the default doc environment.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func LintCommand added in v1.18.0

func LintCommand(opts ...Option) *cobra.Command

LintCommand creates the "lint" cobra command with optional embedder configuration. Embedders can pass WithRegistry or WithEnv to inject Go-registered symbols for semantic analysis.

Types

type Option added in v1.18.0

type Option func(*cmdConfig)

Option configures an exported command factory (LintCommand, DocCommand).

func WithEnv added in v1.18.0

func WithEnv(env *lisp.LEnv) Option

WithEnv injects a fully configured LEnv. For the doc command this is the environment used for documentation queries. For the lint command the env's Runtime.Registry is used for semantic analysis.

func WithRegistry added in v1.18.0

func WithRegistry(reg *lisp.PackageRegistry) Option

WithRegistry injects a PackageRegistry for semantic analysis. The registry's Go-registered builtins, special ops, and macros are merged with stdlib symbols so that the linter recognises embedder-provided functions.

Jump to

Keyboard shortcuts

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