utils

package
v11.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utils contains various utility functions and whatnot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAllSubpackages

func FindAllSubpackages(config *core.Configuration, rootPath string, prefix string) <-chan string

FindAllSubpackages 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

func InitConfig(dir string, bazelCompatibility bool)

InitConfig is a stub used during initial bootstrap.

func PrettyPrintSuggestion

func PrettyPrintSuggestion(needle string, haystack []string, maxSuggestionDistance int) string

PrettyPrintSuggestion implements levenshtein-based suggestions on a sequence of items and produces a single message from them.

func PrintCompletionScript

func PrintCompletionScript()

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.

func ReadStdin

func ReadStdin() <-chan string

ReadStdin reads a sequence of space-delimited words from standard input. Words are pushed onto the returned channel asynchronously.

func Suggest

func Suggest(needle string, haystack []string, maxSuggestionDistance int) []string

Suggest implements levenshtein-based suggestions on a sequence of items.

Types

This section is empty.

Jump to

Keyboard shortcuts

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