list

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HELP string
View Source
var Help = help.CmdHelp{
	HelpTxt: HELP,
	HelpCtx: func(name string) any {
		return map[string]interface{}{
			"Cmd": name,
		}
	},
}
View Source
var SpecRegexLine = regexp.MustCompile(`([^ ]+[^#]+)`)

Functions

func InstallableOut

func InstallableOut(res search.PackageSearchResults) (string, error)

func JsonOut

func JsonOut(res search.PackageSearchResults) (string, error)

func ReadSpecs

func ReadSpecs(file string) ([]string, error)

Types

type ListArgs

type ListArgs struct {
	OnJSON           func()       `long:"json" short:"j"`
	OnText           func()       `long:"text" short:"t"`
	OnInstallable    func()       `long:"installable" short:"i"`
	OnFlake          func()       `long:"flake" short:"f"`
	OnAll            func()       `long:"all" short:"a"`
	OnOne            func()       `long:"one" short:"1"`
	OnNixHub         func()       `long:"nixhub"`
	OnLazamar        func()       `long:"lazamar"`
	OnNixPackagesCom func()       `long:"history"`
	OnRead           func(string) `long:"read" short:"r"`
	ReadFiles        []string
	OutFmt           OutFmt
	ShowOpt          ShowOpt
	OnLazamarChannel func(string) `long:"channel"`
	Color            bool         `long:"color" short:"C"`
	// contains filtered or unexported fields
}

func NewListArgs

func NewListArgs() *ListArgs

func (*ListArgs) Parse

func (a *ListArgs) Parse(args []string) error

func (*ListArgs) ParseAndRun

func (a *ListArgs) ParseAndRun(args []string) error

func (*ListArgs) Run

func (a *ListArgs) Run() error

func (*ListArgs) TextOut

func (a *ListArgs) TextOut(res search.PackageSearchResults) (string, error)

type OutFmt

type OutFmt uint8
const (
	OutJSON OutFmt = iota
	OutText
	OutInstallable
	OutFlake
)

type ShowOpt

type ShowOpt uint8
const (
	ShowAll ShowOpt = iota
	ShowOne
	ShowConstrained
)

Jump to

Keyboard shortcuts

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