session

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package session provides error constructors for session lookup and selection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllWithID

func AllWithID() error

AllWithID returns a validation error when --all is used with a session ID.

Returns:

  • error: "cannot use --all with a session ID; use one or the other"

func AllWithPattern

func AllWithPattern() error

AllWithPattern returns a validation error when --all is used with a pattern.

Returns:

  • error: "cannot use --all with a pattern; use one or the other"

func AmbiguousQuery

func AmbiguousQuery() error

AmbiguousQuery returns an error when a session query matches multiple results.

Returns:

  • error: "ambiguous query, use a more specific ID"

func Find

func Find(cause error) error

Find wraps a session-scanning failure.

Parameters:

  • cause: the underlying error from the parser.

Returns:

  • error: "failed to find sessions: <cause>"

func IDRequired

func IDRequired() error

IDRequired returns an error when no session ID was provided.

Returns:

  • error: "please provide a session ID or use --latest"

func NoneFound

func NoneFound(hint string) error

NoneFound returns an error when no sessions exist.

Parameters:

  • hint: additional guidance (e.g. "use --all-projects to search all"). Empty string omits the hint.

Returns:

  • error: "no sessions found" with an optional hint

func NotFound

func NotFound(query string) error

NotFound returns an error for an unresolved session query.

Parameters:

  • query: the session ID or slug that was not found.

Returns:

  • error: "session not found: <query>"

Types

This section is empty.

Jump to

Keyboard shortcuts

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