Help us shape the future of Go! Take the 2026 Go Developer Survey

reporeader

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoReader

type RepoReader interface {
	Exists(path string) bool
	ReadFile(path string) ([]byte, error)
	// FindFiles returns a list of files that match the given patterns searching up to
	// maxDepth nested sub-directories. maxDepth of 0 limits files to the root dir.
	FindFiles(path string, patterns []string, maxDepth int) ([]string, error)
}

type TestRepoReader

type TestRepoReader struct {
	Files map[string][]byte
}

TestRepoReader is a RepoReader that can be used for testing, and takes a list of relative file paths with their contents

func (TestRepoReader) Exists

func (r TestRepoReader) Exists(path string) bool

func (TestRepoReader) FindFiles

func (r TestRepoReader) FindFiles(path string, patterns []string, maxDepth int) ([]string, error)

func (TestRepoReader) ReadFile

func (r TestRepoReader) ReadFile(path string) ([]byte, error)

type VariableExtractor

type VariableExtractor interface {
	ReadDefaults(r RepoReader) (map[string]string, error)
	MatchesLanguage(lowerlang string) bool
	GetName() string
}

VariableExtractor is an interface that can be implemented for extracting variables from a repo's files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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