Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nishanths committed Dec 5, 2022
1 parent 920609b commit 3a14c73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions exhaustive.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ enum members.
type Biome int
const (
Tundra Biome = iota
Savanna
Desert
Tundra Biome = 1
Savanna Biome = 2
Desert Biome = 3
)
Enum member constants for a particular enum type do not necessarily all
Expand Down
8 changes: 4 additions & 4 deletions switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import (
"golang.org/x/tools/go/analysis"
)

// nodeVisitor is like the visitor function used by Inspector.WithStack,
// nodeVisitor is like the visitor function used by inspector.WithStack,
// except that it returns an additional value: a short description of
// the result of this node visit.
//
// The result is typically useful in debugging or in unit tests to check
// The result value is typically useful in debugging or in unit tests to check
// that the nodeVisitor function took the expected code path.
type nodeVisitor func(n ast.Node, push bool, stack []ast.Node) (proceed bool, result string)

// toVisitor converts the nodeVisitor to a function suitable for use
// with Inspector.WithStack.
// toVisitor converts a nodeVisitor to a function suitable for use
// with inspector.WithStack.
func toVisitor(v nodeVisitor) func(ast.Node, bool, []ast.Node) bool {
return func(node ast.Node, push bool, stack []ast.Node) bool {
proceed, _ := v(node, push, stack)
Expand Down

0 comments on commit 3a14c73

Please sign in to comment.