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 PrintCompletionScript(zsh bool)
- 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 is a stub used during initial bootstrap.
func PrettyPrintSuggestion ¶
PrettyPrintSuggestion implements levenshtein-based suggestions on a sequence of items and produces a single message from them.
func PrintCompletionScript ¶
func PrintCompletionScript(zsh bool)
PrintCompletionScript is a stub used during initial bootstrap.
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.