cmd

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package cmd provides the root command for the maru2 CLI.

Index

Constants

This section is empty.

Variables

View Source
var IsTerminal = func(wr io.Writer) bool {
	if f, ok := wr.(*os.File); ok && f != nil {
		return term.IsTerminal(int(f.Fd()))
	}

	return false
}

IsTerminal is a slim wrapper around term.IsTerminal, exported just so that E2E tests can mock

Functions

func DefaultStyles

func DefaultStyles() *log.Styles

DefaultStyles returns the default styles.

func Main

func Main() int

Main executes the root command for the maru2 CLI.

It returns 0 on success, 1 on failure and logs any errors.

func NewPublishCmd added in v0.5.0

func NewPublishCmd() *cobra.Command

NewPublishCmd creates the root command for the maru2-publish CLI.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd creates the root command for the maru2 CLI.

func ParseExitCode

func ParseExitCode(err error) int

ParseExitCode calculates the exit code from a given error

0 - the error was nil 1 - there was some error n - the underlying error from an exec.Command

func PublishMain added in v0.5.0

func PublishMain() int

PublishMain executes the root command for the maru2-publish CLI.

It returns 0 on success, 1 on failure and logs any errors.

Types

This section is empty.

Directories

Path Synopsis
Package main is the entry point for the application
Package main is the entry point for the application
Package main is the entry point for the application
Package main is the entry point for the application
Package main is the entry point for the application
Package main is the entry point for the application
Package main is the entry point for the application.
Package main is the entry point for the application.

Jump to

Keyboard shortcuts

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