cliview

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package cliview extends package cli by generating GUIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GUI

func GUI[T any](opts *cli.Options, cfg T, cmds ...*cli.Cmd[T])

GUI starts the GUI for the given cli app, which must be passed as a pointer. It should typically not be called by end-user code; see Run.

func Run

func Run[T any, C cli.CmdOrFunc[T]](opts *cli.Options, cfg T, cmds ...C) error

Run runs the given app with the given default configuration file paths. It is similar to cli.Run, but it also runs the GUI if no arguments were provided. The app should be a pointer, and configuration options should be defined as fields on the app type. Also, commands should be defined as methods on the app type with the suffix "Cmd"; for example, for a command named "build", there should be the method:

func (a *App) BuildCmd() error

Run uses os.Args for its arguments.

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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