slugignore

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package slugignore implements Heroku-like .slugignore functionality for a given directory.

Heroku's .slugignore format treats all non-empty and non comment lines (comment lines are those beginning with a # characted) as Ruby Dir globs,

See: https://devcenter.heroku.com/articles/slug-compiler#ignoring-files-with-slugignore

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlugIgnore

type SlugIgnore interface {
	IsIgnored(path string) bool
}

SlugIgnore is the interface for a parsed .slugignore file

A given SlugIgnore is only applicable to the directory which contains the .slugignore file, at the time at which it was parsed.

func ForDirectory

func ForDirectory(dir string) (SlugIgnore, error)

ForDirectory parses the .slugignore for a given directory.

If there is no .slugignore file found, it returns a SlugIgnore which always returns false when IsIgnored is called.

Jump to

Keyboard shortcuts

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