add

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(deps Dependencies, args Args) interface{}

Apply assign a co-author to an alias

Types

type Args

type Args struct {
	Alias    *string
	Coauthor *string
}

Args the arguments of the Runner

type AssignmentAborted

type AssignmentAborted struct {
	Alias             string
	ExistingCoauthor  string
	ReplacingCoauthor string
}

AssignmentAborted nothing happened

type AssignmentFailed

type AssignmentFailed struct {
	Reason error
}

AssignmentFailed assignment of coauthor to alias failed with Reason

type AssignmentSucceeded

type AssignmentSucceeded struct {
	Alias    string
	Coauthor string
}

AssignmentSucceeded assignment of coauthor to alias succeeded

type Definition

type Definition struct {
	CommandName string
	Args        Args
	Deps        Dependencies
}

Definition the command, arguments, and dependencies

func New

func New(name string, alias, coauthor *string) Definition

New the constructor for Definition

type Dependencies

type Dependencies struct {
	SanityCheckCoauthor func(string) error
	GitAddAlias         func(string, string) error
	GitResolveAlias     func(string) (string, error)
	StdinNewReader      func() *bufio.Reader
	StdinReadLine       func(reader *bufio.Reader) (string, error)
}

Dependencies the dependencies of the Runner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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