cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cli builds the weibo command tree on top of the weibo library.

Index

Constants

View Source
const (
	FormatTable = render.FormatTable
	FormatJSON  = render.FormatJSON
	FormatJSONL = render.FormatJSONL
	FormatCSV   = render.FormatCSV
	FormatTSV   = render.FormatTSV
	FormatURL   = render.FormatURL
	FormatRaw   = render.FormatRaw
)

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Build metadata, set via -ldflags at release time.

Functions

func NewRenderer

func NewRenderer(w io.Writer, format Format, fields []string, noHeader bool, tmpl string) *render.Renderer

NewRenderer builds a renderer writing to w.

func Root

func Root() *cobra.Command

Root builds the root command and its subtree.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App holds shared state threaded through every command.

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError carries a process exit code up to main.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type Format

type Format = render.Format

Format aliases so command code reads cleanly.

Jump to

Keyboard shortcuts

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