parse

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AstSchema

type AstSchema struct {
	ModulePath string
	Packages   map[string]Dependencies
}

AstSchema is a simpler presentation of the ast of a project.

func Parse

func Parse(pathDir string) (AstSchema, error)

Parse parses the project located under pathDir and returns an AstSchema.

type Dep

type Dep struct {
	PackageName    string
	DependencyName string
	VarName        string
	Funcs          []string
	External       bool
}

Dep represent one dependency injected.

type Dependencies

type Dependencies map[string]Dependency

Dependencies contains all the dependencies of a package.

type Dependency

type Dependency struct {
	Comment string
	Imports []Import
	Deps    map[string][]Dep
}

Dependency represent a type that has been identified as a dependency.

type Import added in v0.1.0

type Import struct {
	Path     string
	External bool
}

Import represent an imported package.

Jump to

Keyboard shortcuts

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