cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeNewRuntime added in v0.2.0

func InitializeNewRuntime(program *AnemosProgram) (*js.JsRuntime, error)

func Run

func Run(program *AnemosProgram) error

Types

type AnemosProgram

type AnemosProgram struct {
	RootCommand               *cobra.Command
	RegisterRuntimeCallback   func(runtime *js.JsRuntime) error
	InitializeRuntimeCallback func(runtime *js.JsRuntime) error
	ExtraJsDeclarations       []fs.FS
}

type CliSlogHandler

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

func NewCliSlogHandler

func NewCliSlogHandler(writer io.Writer, handlerOptions *slog.HandlerOptions) *CliSlogHandler

func (*CliSlogHandler) Enabled

func (handler *CliSlogHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*CliSlogHandler) Handle

func (handler *CliSlogHandler) Handle(context context.Context, record slog.Record) error

func (*CliSlogHandler) WithAttrs

func (handler *CliSlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*CliSlogHandler) WithGroup

func (handler *CliSlogHandler) WithGroup(name string) slog.Handler

type SourceType

type SourceType string
var (
	SourceTypePackage SourceType = "package"
	SourceTypeURL     SourceType = "url"
)

Jump to

Keyboard shortcuts

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