cli

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP  = "aligo"
	VER  = "2.1.2"
	DESC = "Utility for viewing and checking Go struct alignment"
)

App info

View Source
const (
	OPT_ARCH     = "a:arch"
	OPT_STRUCT   = "s:struct"
	OPT_TAGS     = "t:tags"
	OPT_PAGER    = "P:pager"
	OPT_NO_COLOR = "nc:no-color"
	OPT_HELP     = "h:help"
	OPT_VER      = "v:version"

	OPT_VERB_VER     = "vv:verbose-version"
	OPT_COMPLETION   = "completion"
	OPT_GENERATE_MAN = "generate-man"
)

Constants with options names

Variables

This section is empty.

Functions

func Check

func Check(r *report.Report) bool

Check checks report for problems

func PrintFull

func PrintFull(r *report.Report)

PrintFull prints all report info

func PrintStruct

func PrintStruct(r *report.Report, strName string, optimal bool)

PrintStruct prints info about struct

func Run

func Run(gitRev string, gomod []byte)

Run is main CLI function

Types

type Renderer

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

func NewRenderer

func NewRenderer(fields []*report.Field, detailed bool) *Renderer

NewRenderer creates new filed info renderer

func (*Renderer) PrintField

func (r *Renderer) PrintField(f *report.Field)

PrintField prints field info

func (*Renderer) PrintPlaceholder

func (r *Renderer) PrintPlaceholder()

PrintPlaceholder prints placeholder

Jump to

Keyboard shortcuts

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