resolve

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: 0 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 resolve turns what the user calls a gist into its ID.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Direct

func Direct(arg string) (string, bool)

Direct gives the ID when arg says it by itself, as a whole ID or a URL, with no need to look in a list.

func Find

func Find(arg string, gists []model.Gist) (string, error)

Find looks for arg in gists: an ID, the start of an ID, then a file name. The first of these that names one gist decides.

Types

type AmbiguousError

type AmbiguousError struct {
	Arg        string
	Candidates []model.Gist
}

AmbiguousError says several gists match, which it names.

func (*AmbiguousError) Error

func (e *AmbiguousError) Error() string

type NotFoundError

type NotFoundError struct {
	Arg string
}

NotFoundError says no gist matches.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Jump to

Keyboard shortcuts

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