flags

package
v0.0.0-...-def3303 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package flags add Mode and Config flags to git-in-sync.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Printv

func Printv(f Flags, s string, z ...interface{}) string

Printv calls prints to standard output if not running in 'oneline' or 'testing' mode.

Types

type Flags

type Flags struct {
	Mode   string
	Config string
}

Flags records values for Mode and Config.

func Init

func Init() (f Flags)

Init returns validated user input as Flags.

func Testing

func Testing(c string) Flags

Testing returns a Flags instance with Mode == "testing".

func (Flags) ClearScreen

func (f Flags) ClearScreen()

ClearScreen clears the screen.

func (Flags) Login

func (f Flags) Login() bool

Login returns true if f.Mode == "login".

func (Flags) Logout

func (f Flags) Logout() bool

Logout returns true if f.Mode == "logout".

Jump to

Keyboard shortcuts

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