Documentation ¶
Index ¶
Constants ¶
const DefaultGitRepo string = "https://github.com/github/gitignore.git"
DefaultGitRepo is the default repository to use for gitignore files.
const VERSION = "UNKNOWN"
VERSION is the app-global version string which is populated with a real value during the build process.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // List returns the list of options that can be used to generate a // gitignore file. List() ([]string, error) // Generate creates a gitignore file with the given options. Generate(options []string) (string, error) // Update updates this plugin's local data. Update() error }
Adapter is any adapter that the git-ignore client can use to retrieve content for generating a gitignore file.
type Client ¶
type Client struct {
Adapters []Adapter
}
Client is an object used to interact with the gitignore provider. It knows how to retrieve a list of supported apps to be ignored and turn them into a gitignore file.
func (*Client) Generate ¶
Generate generates a .gitignore file that excludes files based on the given options.
type GitAdapter ¶
GitAdapter is an adapter for pulling gitignore data from a git repository.
func NewGitAdapter ¶
func NewGitAdapter() (*GitAdapter, error)
NewGitAdapter creates a new adapter for working with Git repositories.
func (*GitAdapter) Generate ¶
func (adapter *GitAdapter) Generate(options []string) (string, error)
Generate creates a gitignore file with the given options.
func (*GitAdapter) List ¶
func (adapter *GitAdapter) List() ([]string, error)
List returns the list of options that can be used to generate a gitignore file.
func (*GitAdapter) Update ¶
func (adapter *GitAdapter) Update() error
Update updates this plugin's local data.