duration

package module
v0.0.0-...-158181d Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 15 Imported by: 0

README

duration

This analyzer had been merged to unitconst.

godoc.org

duration finds using untyped constant as time.Duration.

duration := 5 // 5 * time.Second is correct
time.Sleep(duration)
$ go vet -vettool=`which duration` main.go
TODO

Documentation

Index

Constants

This section is empty.

Variables

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

Analyzer finds using untyped constant as time.Duration.

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