glob

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPatternValid

func IsPatternValid(pattern string) bool

If IsPatternValid(pattern) is true, filepath.Match(pattern, name) will not return an error. See also https://go-review.googlesource.com/c/go/+/143477

Types

type Glob

type Glob string

func FromPath

func FromPath(path string) (Glob, error)

The file tailer implementation switched from watching single paths to globs, but the rest of grok_exporter just supports single files. FromPath creates a Glob from a file path, so that we can use the new file tailers but be sure only a single file is watched.

func Parse

func Parse(pattern string) (Glob, error)

func (Glob) Dir

func (g Glob) Dir() string

func (Glob) Match

func (g Glob) Match(path string) bool

Jump to

Keyboard shortcuts

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