state

package module
v0.0.0-...-d0b6730 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2019 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Update Gitignore

Go Report Card GoDoc Coverage Status Build Status codecov

Documentation

Index

Constants

View Source
const (
	// Suffix is the file suffix to grok.
	Suffix = ".gitignore"
)

Variables

View Source
var (
	// ErrActionRequired is returned when no command action is provided
	ErrActionRequired = errors.New("need an action")
	// ErrInvalidRepo is returned if the repo provided on the command line does not look like <owner>/<name>.
	ErrInvalidRepo = errors.New("invalid repo")
)
View Source
var (
	// ErrTokenNotFound is returned if the client was unable to locate a GITHUB_TOKEN environment variable
	ErrTokenNotFound = errors.New("token not found")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) GetBlob

func (c *Client) GetBlob(sha string) (*github.Blob, error)

func (*Client) GetBranch

func (c *Client) GetBranch(branch string) (*github.Branch, error)

func (*Client) GetRateLimits

func (c *Client) GetRateLimits() (*github.RateLimits, error)

func (*Client) GetRepository

func (c *Client) GetRepository() (*github.Repository, error)

func (*Client) GetTree

func (c *Client) GetTree(sha string) (*github.Tree, error)

func (*Client) GetUser

func (c *Client) GetUser() (*github.User, error)

func (*Client) GitHubClient

func (c *Client) GitHubClient() *github.Client

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(httpClient *http.Client)

func (*Client) Token

func (c *Client) Token() (*oauth2.Token, error)

type Command

type Command interface {
	GetName() string
	Run() ExitStatus
}

type ExitStatus

type ExitStatus uint8

type State

type State struct {
	*app.App
	// contains filtered or unexported fields
}

The State of the application.

func (*State) Client

func (s *State) Client() (*Client, error)

func (*State) Command

func (s *State) Command() (Command, error)

func (*State) Debug

func (s *State) Debug() bool

func (*State) ParseArguments

func (s *State) ParseArguments() error

func (*State) Repo

func (s *State) Repo() string

func (*State) SetDebug

func (s *State) SetDebug(debug bool)

func (*State) SetRepo

func (s *State) SetRepo(repo string)

func (*State) SetTimeout

func (s *State) SetTimeout(timeout time.Duration)

func (*State) Timeout

func (s *State) Timeout() time.Duration

type Template

type Template struct {
	Name string
	Size uint64
	Path string
	Tags []string
	SHA  string
}

Template represents a gitignore template from the repository

func NewTemplate

func NewTemplate(entry github.TreeEntry) *Template

New builds a new Template struct from a GitHub TreeEntry. Returns nil if the entry doesn't point to a Gitignore template.

Directories

Path Synopsis
cmd
record command

Jump to

Keyboard shortcuts

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