cmdutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 7 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAttachments added in v1.0.1

func DownloadAttachments(attachments []api.Attachment, id int, output string, dl func(int) (string, []byte, error)) error

DownloadAttachments saves the attachments like SaveAttachments and prints the saved paths.

func LoadConfigAndClient

func LoadConfigAndClient() (*config.Config, *api.Client, error)

LoadConfigAndClient loads the config file and creates an API client for the currently active space. Returns an error if not authenticated.

func ResolveProjectKey added in v1.0.1

func ResolveProjectKey(cfg *config.Config, flag string) (string, error)

ResolveProjectKey returns the --project flag value or the default project.

func SaveAttachments added in v1.1.0

func SaveAttachments(attachments []api.Attachment, id int, output string, dl func(int) (string, []byte, error)) ([]string, error)

SaveAttachments saves the attachments (all of them, or only id when non-zero) into output and returns the saved paths, including those saved before an error. It never writes to stdout, which is the protocol channel of the MCP server.

func SaveFile added in v1.0.1

func SaveFile(dir, name, fallback string, data []byte) (string, error)

SaveFile writes data into dir using only a sanitized base name of name, so a server-supplied name cannot escape dir. It never overwrites or follows an existing path: on collision it appends " (n)". fallback is used when name is unusable.

func StripControl added in v1.0.1

func StripControl(s string) string

StripControl removes terminal control and bidi/format characters (see api.StripControl).

Types

This section is empty.

Jump to

Keyboard shortcuts

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