input

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(msg string) (string, error)

Get asks for user-input.

func GetCommitType

func GetCommitType(printHelp bool) (string, error)

func GetMultiLineInput

func GetMultiLineInput(msg string) (string, error)

GetMultiLineInput lets a user input many lines until two blank lines follow one another.

func GetNonEmpty

func GetNonEmpty(msg string) (string, error)

GetNonEmpty asks for user-input until the input is not empty.

func GetWithDefault

func GetWithDefault(msg, defa string) (string, error)

GetWithDefault asks for user-input and provides a default.

func WriteState

func WriteState(path string, pair []TeamMember, story string) error

WriteState marshalls and saves the new pair and story to filesystem.

func WriteTeamMembersConfig

func WriteTeamMembersConfig(path string, tms []TeamMember) error

WriteTeamMembersConfig writes a list of team-members to the filesystem.

Types

type CommitConfig

type CommitConfig struct {
	// Story mode defines if you will be asked for the current story.
	CommitStyle string `json:"commitStyle"`

	// TeamMembersConfigPath specifies the path to the team-members-configuration-file.
	TeamMembersConfigPath string `json:"teamMembersConfigPath"`
}

CommitConfig contains two configuration-parameters.

func InitCommitConfig

func InitCommitConfig(path string) (CommitConfig, error)

InitCommitConfig reads and validates the commit-configuration and returns the corresponding object or error.

func (*CommitConfig) String

func (c *CommitConfig) String() string

type State

type State struct {
	// CurrentScope specifies the last saved story.
	CurrentScope string `json:"story"`

	// CurrentPair specifies the last saved pairing-partner.
	CurrentPair []string `json:"pair"`
}

State contains two state-parameters.

func ReadState

func ReadState(path string) (State, error)

ReadState reads and parses the state from the path.

type TeamMember

type TeamMember struct {
	GithubUserName string `json:"username"`
	Email          string `json:"mail"`
	Abbreviation   string `json:"abbreviation"`
}

TeamMember contains all information needed to identify a single team-member.

func InitTeamMembersConfig

func InitTeamMembersConfig(path string) ([]TeamMember, error)

InitTeamMembersConfig reads and parses a TeamMembersConfig. If not found, it creates on.

func (TeamMember) String

func (tm TeamMember) String() string

Jump to

Keyboard shortcuts

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