greasi

package module
v0.8.22 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: BSD-3-Clause Imports: 10 Imported by: 1

README

greasi

Package greasi extends Grease by generating GUIs; it is the Grease graphical user Interface (Greasi)

Documentation

Index

Constants

View Source
const (
	// Version is the version of this package being used
	Version = "v0.8.22"
	// GitCommit is the commit just before the latest version commit
	GitCommit = "97943d2"
	// VersionDate is the date-time of the latest version commit in UTC (in the format 'YYYY-MM-DD HH:MM', which is the Go format '2006-01-02 15:04')
	VersionDate = "2023-12-26 23:39"
)

Variables

This section is empty.

Functions

func App added in v0.8.4

func App[T any](opts *grease.Options, cfg T, cmds ...*grease.Cmd[T])

App does runs the GUI. It should be called on the main thread. It should typically not be called by end-user code; see Run.

func GUI

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

func Run

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

Run runs the given app with the given default configuration file paths. It is similar to grease.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
basic command

Jump to

Keyboard shortcuts

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