Пример #1
0
// IsDef reports whether the given declaration is a definition.
func IsDef(decl ast.Decl) bool {
	if _, ok := decl.(*ast.VarDecl); ok {
		return true
	}
	return decl.Value() != nil
}