Documentation ¶
Overview ¶
Package utils contains various utility functions and whatnot.
Index ¶
- func FindAllSubpackages(config *core.Configuration, rootPath string, prefix string) <-chan string
- func InitConfig(dir string, bazelCompatibility bool)
- func PrettyPrintSuggestion(needle string, haystack []string, maxSuggestionDistance int) string
- func ReadAllStdin() []string
- func ReadStdin() <-chan string
- func Suggest(needle string, haystack []string, maxSuggestionDistance int) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllSubpackages ¶
func FindAllSubpackages(config *core.Configuration, rootPath string, prefix string) <-chan string
Finds all packages under a particular path. Used to implement rules with ... where we need to know all possible packages under that location.
func InitConfig ¶
InitConfig initialises a .plzconfig template in the given directory.
func PrettyPrintSuggestion ¶
PrettyPrintSuggestion implements levenshtein-based suggestions on a sequence of items and produces a single message from them.
func ReadAllStdin ¶
func ReadAllStdin() []string
ReadAllStdin reads standard input in its entirety to a slice. Since this reads it completely before returning it won't handle a slow input very nicely. ReadStdin is therefore preferable when possible.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.