utils

package
v7.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: Apache-2.0 Imports: 9 Imported by: 10 modules, 54 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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(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.

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