analyzer

package
v0.0.0-...-b872246 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer helps understand the source code present in a given directory Handy when implementing new Planners that need to analyze files in order to determine what to do.

func NewAnalyzer

func NewAnalyzer(rootDir string) (*Analyzer, error)

func (*Analyzer) AbsPath

func (a *Analyzer) AbsPath(path string) string

AbsPath resolves the given path and turns it into an absolute path relative to the root directory of the analyzer. If the given path is already absolute it leaves it as is.

func (*Analyzer) GlobFiles

func (a *Analyzer) GlobFiles(patterns ...string) []string

GlobFiles returns all the files matching the given glob patterns. Patterns can be relative to the analyzer's root directory. Glob patterns support "double star" matches.

func (*Analyzer) HasAnyFile

func (a *Analyzer) HasAnyFile(patterns ...string) bool

type Version

type Version string

Version handles very simple numeric semver versions (e.g. "1.2.3")

func NewVersion

func NewVersion(v string) (*Version, error)

func (Version) Exact

func (v Version) Exact() string

func (Version) Major

func (v Version) Major() string

func (Version) MajorMinor

func (v Version) MajorMinor() string

func (Version) MajorMinorConcatenated

func (v Version) MajorMinorConcatenated() string

Jump to

Keyboard shortcuts

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