cli

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitCodeNoError             = 0
	ExitCodeMiscError           = 1
	ExitCodeBlockParsingError   = 1 << 1
	ExitCodeFormattingDiffError = 1 << 2
)

Variables

This section is empty.

Functions

func Make

func Make() *cobra.Command

Types

type Block added in v0.3.0

type Block struct {
	BlockNumber int    `json:"block_number"`
	StartLine   int    `json:"start_line"`
	EndLine     int    `json:"end_line"`
	Text        string `json:"text"`
}

type Output added in v0.3.0

type Output struct {
	BlockCount int     `json:"block_count"`
	Blocks     []Block `json:"blocks"`
}

func (Output) MarshalJSON added in v0.3.0

func (o Output) MarshalJSON() ([]byte, error)

MarshalJSON creates an empty slice if it is nil then marshals to JSON

Jump to

Keyboard shortcuts

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