gotostmt

package module
v0.2.6 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 gotostmt provides a go/analysis analyzer that forbids the goto statement, per the gomatic Go standard that control flow uses early returns and extracted helpers rather than goto.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "gotostmt",
	Doc:      "reports use of the goto statement, which the gomatic Go standard forbids",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer reports every use of the goto statement.

View Source
var Registration = goyze.Registration{
	Name:       "gotostmt",
	Categories: []goyze.Category{"patterns"},
	URL:        "https://docs.gomatic.dev/yze/gotostmt",
	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-gotostmt command
Command yze-go-gotostmt runs the gotostmt analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
Command yze-go-gotostmt runs the gotostmt analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).

Jump to

Keyboard shortcuts

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