which

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWhich

func RunWhich(w io.Writer, args []string, opts WhichOptions) error

RunWhich locates a command

Types

type WhichOptions

type WhichOptions struct {
	All  bool // -a: print all matches
	JSON bool // --json: output as JSON
}

WhichOptions configures the which command behavior

type WhichResult

type WhichResult struct {
	Command string   `json:"command"`
	Paths   []string `json:"paths"`
	Found   bool     `json:"found"`
}

WhichResult represents which output for JSON

Jump to

Keyboard shortcuts

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