gitignore

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package gitignore provides an interface to gitignore.io to fetch gitignore templates. These templates are used to optionally populate the .gitignore file of a new project.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNotFound is returned if a gitignore template could not be found.
	ErrNotFound = errors.New("gitignore not found")
)

Functions

func Get

func Get(query string) (string, error)

Get fetches the gitignore template for query from gitignore.io. The query can be a comma-separated list of gitignore templates (e.g. "go,python") which are combined into a single gitignore template. Will return an error if the http connection fails or if the response status code is not 200. Will return ErrNotFound if any of the requested gitignore templates cannot be found.

func List

func List() ([]string, error)

List obtains a list of available gitignore templates from gitignore.io. Will return an error if the http connection fails or the response status code is not 200.

Types

This section is empty.

Jump to

Keyboard shortcuts

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