uid

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package uid provides unique identifiers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(cmd *cobra.Command) *url.URL

Command creates a uid for given command.

func Executable

func Executable() string

Executable returns the name of the executable.

func Flag

func Flag(cmd *cobra.Command, flag *pflagfork.Flag) *url.URL

Flag creates a uid for given flag.

func Map

func Map(uids ...string) func(s string) (*url.URL, error)

Map maps values to uids to simplify testing.

Map(
    "go.mod", "file://path/to/go.mod",
    "go.sum", "file://path/to/go.sum",
)

Types

type Context

type Context interface {
	Abs(s string) (string, error)
	Getenv(key string) string
	LookupEnv(key string) (string, bool)
}

Jump to

Keyboard shortcuts

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