parser

package
v0.0.0-...-e3822e6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package parser parses Go code and keeps track of all the types defined and provides access to all the constants defined for an int type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Name string
	// contains filtered or unexported fields
}

A Package contains all the information related to a parsed package.

func ParsePackage

func ParsePackage(directory string) (*Package, error)

ParsePackage parses the package in the given directory and returns it.

func (*Package) ValuesOfType

func (pkg *Package) ValuesOfType(typeName string) ([]string, map[string]bool, error)

ValuesOfType is inspect files for constant value, default variable and methods for type, return a list of the constant values, and map of templates which must be ignored, because they have already been declared.

Jump to

Keyboard shortcuts

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