utils

package
v13.2.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 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 AddAll

func AddAll(map1 map[string]string, map2 map[string]string) map[string]string

AddAll adds all of one map[string]string to another.

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 initialises a .plzconfig template in the given directory.

func Max

func Max(x, y int) int

Max returns the larger of two ints.

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 prints Please's completion script to stdout.

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