nopanic

package module
v0.1.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: 8 Imported by: 0

README

Documentation

Overview

Package nopanic provides a go/analysis analyzer that forbids calls to the built-in panic outside test files, per the gomatic Go standard that errors are returned rather than raised by panicking.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "nopanic",
	Doc:      "reports calls to the built-in panic outside test files, which the gomatic Go standard forbids in favor of returning errors",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer reports calls to the built-in panic in non-test files.

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