resolver

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver has the responsibility of checking the types of all the packages scanned globally and exclude struct fields with types not included in any of the scanned packages and replacing some aliases to other types with their actual type. Consider the type `type IntList []int` on the field `Foo`, the type of that field would be changed from a named `IntList` type to a repeated basic type `int`.

func New

func New() *Resolver

New creates a new Resolver with the default custom types registered. These are time.Time and time.Duration. Those types will be considered correct even though their packages are not in any of the packages given.

func (*Resolver) Resolve

func (r *Resolver) Resolve(pkgs []*scanner.Package)

Resolve checks the types of all the packages passed in a global manner. Also, it sets to `true` the `Resolved` field of the package, meaning that they can be safely used after it.

Jump to

Keyboard shortcuts

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