anonstruct

package module
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 6 Imported by: 0

README

Documentation

Overview

Package anonstruct provides a go/analysis analyzer enforcing the gomatic Go standard that struct types are named rather than anonymous. Empty anonymous structs (idiomatic for sets and signaling channels) are allowed.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "anonstruct",
	Doc:      "reports anonymous struct types (with fields), which the gomatic Go standard forbids in favor of named types",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer reports anonymous struct types that carry fields.

View Source
var Registration = goyze.Registration{
	Name:       "anonstruct",
	Categories: []goyze.Category{"types", "structure"},
	URL:        "https://docs.gomatic.dev/yze/anonstruct",
	Analyzer:   Analyzer,
}

Registration declares this analyzer to the yze framework.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
yze-go-anonstruct command
Command yze-go-anonstruct runs the anonstruct analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).
Command yze-go-anonstruct runs the anonstruct analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).

Jump to

Keyboard shortcuts

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