pathspec

package module
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2014 License: Apache-2.0 Imports: 8 Imported by: 4

README

go-pathspec

A package for pattern matching of file paths. Currently the gitignore and chefignore patterns are included in the package.

Author

Sander van Harmelen (sander@xanzy.io)

License

The file 'chefignore.go' is a customized version of https://code.google.com/p/go/source/browse/src/pkg/path/match.go which is licensed under a BSD-style license. See the file header and/or the GO-LICENSE file for more info. The rest of the package is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadPattern = errors.New("syntax error in pattern")

ErrBadPattern indicates a globbing pattern was malformed.

Functions

func ChefIgnore

func ChefIgnore(content io.Reader, name string) (ignore bool, err error)

func GitIgnore

func GitIgnore(content io.Reader, name string) (ignore bool, err error)

Types

type GitIgnorePattern

type GitIgnorePattern struct {
	Regex   string
	Include bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL