{"modulePath":"github.com/context-dot-dev/context-dev-cli","version":"v1.28.1","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package cmd\n\n## Constants\n\n```go\nconst Version = \"1.28.1\" // x-release-please-version\n\n```\n\n## Variables\n\n```go\nvar (\n\tCommand            *cli.Command\n\tCommandErrorBuffer bytes.Buffer\n)\n```\n\n```go\nvar OutputFormats = []string{\"auto\", \"explore\", \"json\", \"jsonl\", \"pretty\", \"raw\", \"yaml\"}\n```\n\n## Functions\n\n```go\nfunc ShowJSON(res gjson.Result, opts ShowJSONOpts) error\n```\nShowJSON displays a single JSON result to the user.\n\n```go\nfunc ShowJSONIterator[T any](iter jsonview.Iterator[T], itemsToDisplay int64, opts ShowJSONOpts) error\n```\nShowJSONIterator displays an iterator of values to the user. Use itemsToDisplay = -1 for no limit.\n\n```go\nfunc ValidateBaseURL(value, source string) error\n```\nValidateBaseURL checks that a base URL is correctly prefixed with a protocol scheme and produces a better error message than the person would see otherwise if it doesn't.\n\n## Types\n\n```go\ntype BodyContentType int\n```\n\n```go\nconst (\n\tEmptyBody BodyContentType = iota\n\tMultipartFormEncoded\n\tApplicationJSON\n\tApplicationOctetStream\n)\n```\n\n```go\ntype FileEmbedStyle int\n```\n\n```go\nconst (\n\t// EmbedText reads referenced files fully into memory and substitutes the file's contents back into the\n\t// value as a string. Binary files are base64-encoded. Used for JSON request bodies and for headers and\n\t// query parameters, where the file contents need to be serialized inline.\n\tEmbedText FileEmbedStyle = iota\n\n\t// EmbedIOReader replaces file references with an io.Reader that streams the file's contents. Used for\n\t// `multipart/form-data` and `application/octet-stream` request bodies, where files are uploaded as binary\n\t// parts rather than embedded into a text value.\n\tEmbedIOReader\n)\n```\n\n```go\ntype FilePathValue string\n```\nFilePathValue is a string wrapper that marks a value as a file path whose contents should be read and embedded in the request. Unlike a regular string, embedFilesValue always treats a FilePathValue as a file path without needing the \"@\" prefix.\n\n```go\ntype ShowJSONOpts struct {\n\tExplicitFormat bool      // true if the user explicitly passed --format\n\tFormat         string    // output format (auto, explore, json, jsonl, pretty, raw, yaml)\n\tRawOutput      bool      // like jq -r: print strings without JSON quotes\n\tStderr         io.Writer // stderr for warnings; injectable for testing; defaults to os.Stderr\n\tStdout         *os.File  // stdout (or pager); injectable for testing; defaults to os.Stdout\n\tTitle          string    // display title\n\tTransform      string    // GJSON path to extract before displaying\n}\n```\nShowJSONOpts configures how JSON output is displayed.\n\n","path":"github.com/context-dot-dev/context-dev-cli/pkg/cmd","name":"cmd","synopsis":"","isRedistributable":true}
