struct_init

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inspect

func Inspect(input InspectInput) error

Types

type InspectInput

type InspectInput struct {
	Pass        *analysis.Pass
	DisableTest bool
	Handler     func(passs *analysis.Pass, si StructInit) error
}

type StructInit

type StructInit struct {
	AstFile    ast.File
	CompLit    ast.CompositeLit
	TypeStruct types.Struct
	// contains filtered or unexported fields
}

func (StructInit) IsIgnored

func (si StructInit) IsIgnored(pattern string) bool

func (StructInit) IsSamePackage

func (si StructInit) IsSamePackage() bool

func (StructInit) IsUnnamed

func (si StructInit) IsUnnamed() bool

func (StructInit) VisibleFields

func (si StructInit) VisibleFields() (fields []*types.Var)

Jump to

Keyboard shortcuts

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