enum

package
v0.0.0-...-0c3c093 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package enum performs totality checking for switches over enum.

Go emulates enums using a combination of int-type consts defined using iota for the first element. This makes it difficult to know when a switch/case statement covers an entire enum. This pass ensures that any switch over an enum explicitly lists all members.

Index

Constants

View Source
const Doc = `` /* 328-byte string literal not displayed */

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "enum",
	Doc:              Doc,
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	Run:              run,
	RunDespiteErrors: true,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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