list

package
v1.135.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package list implements `bitbottle snippet list`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdList

func NewCmdList(f *factory.Factory, runF ...func(*Options) error) *cobra.Command

NewCmdList constructs the cobra command. The runF override lets tests inject their own runner without standing up a real backend.

func ResolveWorkspace

func ResolveWorkspace(f *factory.Factory, host, flag string) (string, error)

ResolveWorkspace returns the workspace to use: explicit flag wins, then the User slug from the host's config entry (the Bitbucket username/workspace slug). Exported so sibling packages (view, create, delete) can share the logic.

func SnippetListFields

func SnippetListFields(f *factory.Factory, cfg format.OutputConfig) *format.Printer[backend.Snippet]

SnippetListFields builds a printer with the standard snippet list fields. Exported so sibling commands (view, etc.) can extend it.

Types

type Options

type Options struct {
	Output    format.OutputConfig
	Hostname  string
	Workspace string
	Limit     int
}

Options carries parsed flags for `snippet list`.

Jump to

Keyboard shortcuts

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