utils

package
v13.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: Apache-2.0 Imports: 13 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 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