cli

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package cli provides shared CLI application logic for dilivet and mldsa-vet.

This package eliminates code duplication between the two CLI entrypoints by providing a common App structure and execution logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string // Binary name (e.g., "dilivet" or "mldsa-vet")
	Version string // Version string (injected via ldflags)
	Out     io.Writer
	Err     io.Writer
}

App represents a CLI application with common functionality.

func (*App) PrintHelp

func (a *App) PrintHelp()

PrintHelp displays comprehensive usage information.

func (*App) Run

func (a *App) Run(args []string) int

Run executes the CLI application with the given arguments.

It parses flags, handles common options (version, help), and executes the appropriate command. Returns an exit code suitable for os.Exit().

Jump to

Keyboard shortcuts

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