gitignore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Go gitignoreType = "Go"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	Load(context.Context, gitignoreType) (string, error)
}

Loader loads gitignore files based on the gitignore type

func NewLoader

func NewLoader() (Loader, error)

type Parser

type Parser interface {
	Parse(ctx context.Context, s string) (gitignoreType, error)
}

Parser converts strings to their corresponding gitignore type Allows mapping of multiple strings to a single, well known gitignore type For example,

parser(ctx, "golang")
"Go"
parser(ctx, "go")
"Go"

func NewParser

func NewParser() (Parser, error)

type Service

type Service interface {
	Generate(ctx context.Context, gitignoreType string) (string, error)
}

Service provides gitignore generation services

func NewService

func NewService(options ...ServiceOption) (Service, error)

type ServiceOption

type ServiceOption func(*service) error

func WithLoader

func WithLoader(loader Loader) ServiceOption

func WithParser

func WithParser(parser Parser) ServiceOption

Jump to

Keyboard shortcuts

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