cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// CheckGit checks if a git repository exists.
	CheckGit bool
	// Clipboard doesn't commit, but copies the commit message to the clipboard.
	Clipboard bool
	// HookPath is the path to the file to write the commit message to.
	HookPath string
}

CLI represents this application itself.

func NewCLI

func NewCLI(checkGit bool, clipboard bool, hook string) (*CLI, error)

NewCLI returns a new CLI.

func (CLI) GitRoot

func (c CLI) GitRoot() (string, error)

GitRoot returns the path to the git root directory.

func (CLI) Hook

func (c CLI) Hook() error

Hook sets the commit hook.

func (CLI) Init

func (c CLI) Init() error

Init downloads the list of gmojis.

func (CLI) List

func (c CLI) List() error

List prints the list of gmojis.

func (CLI) ListPath

func (c CLI) ListPath() (string, error)

ListPath returns the path to the gitmojis.json file.

func (CLI) Run

func (c CLI) Run() error

Run runs CLI.

func (CLI) Wget

func (c CLI) Wget(src, dst string) error

Wget downloads a file from the given URL.

Jump to

Keyboard shortcuts

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