report

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Tag     string `json:"tag"`
	Comment string `json:"comment"`
	Size    int64  `json:"size"`
}

Field contains info about field

type Package

type Package struct {
	Path    string    `json:"path"`
	Structs []*Struct `json:"structs"`
}

Package contains info about all structs in package

func (*Package) IsEmpty

func (p *Package) IsEmpty() bool

IsEmpty returns true if package is empty

type Position

type Position struct {
	File string `json:"file"`
	Line int    `json:"line"`
}

Position contains info about struct position

type Report

type Report struct {
	Packages []*Package `json:"packages"`
}

Report contains aligning info about packages

func (*Report) IsEmpty

func (r *Report) IsEmpty() bool

IsEmpty returns true if report is empty

type Struct

type Struct struct {
	Name          string   `json:"name"`
	Position      Position `json:"position"`
	Fields        []*Field `json:"fields"`
	AlignedFields []*Field `json:"aligned_fields"` // nil if Size == OptimalSize
	Size          int64    `json:"size"`
	OptimalSize   int64    `json:"optimal_size"`
	Ignore        bool     `json:"ignore"`
}

Struct contains info about fields aligning

func (*Struct) String

func (s *Struct) String() string

String returns string representation of struct

Jump to

Keyboard shortcuts

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