cli

package
v0.0.0-...-525db63 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cli implements feature steps to handle cli command execution.

	Feature: Example

	 Scenario: Greet the default user
	   When I run "example-cli greet"
    Then the output should contain "Hello, World!"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterContext

func RegisterContext(s *godog.ScenarioContext, cliApp *App)

RegisterContext adds command context to test suite.

Types

type App

type App struct {
	Commands map[string]*Command
}

App manages the execution of cli.App command.

func (*App) Add

func (c *App) Add(command string, app func() *cli.App)

Add adds a command to the app.

type Command

type Command struct {
	Output bytes.Buffer
	Err    error
	// contains filtered or unexported fields
}

Command manages the run of cobra command.

Jump to

Keyboard shortcuts

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