cli

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

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

App info

View Source
const (
	OPT_ARCH     = "a:arch"
	OPT_STRUCT   = "s:struct"
	OPT_TAGS     = "t:tags"
	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

View Source
const MAX_TYPE_SIZE = 32

MAX_TYPE_SIZE maximum type size

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 added in v1.6.1

func Run(gitRev string, gomod []byte)

Run is main CLI function

Types

type Renderer added in v1.5.0

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

func NewRenderer added in v1.5.0

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

NewRenderer creates new filed info renderer

func (*Renderer) PrintField added in v1.5.0

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

PrintField prints field info

func (*Renderer) PrintPlaceholder added in v1.5.0

func (r *Renderer) PrintPlaceholder()

PrintPlaceholder prints placeholder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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