analyzer

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package analyzer contains methods to analyze go file to find interfaces.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrGoSyntax returns when parsed packages contains errors.
	ErrGoSyntax = errors.New("go syntax")
	// ErrUnexpectedData returns when inspector or analyzer got unexpected data, description in error.
	ErrUnexpectedData = errors.New("unexpected data")
	// ErrWrongScopeType returns when inspector got scope of the another type not the Interface.
	// This is not a error when you pass not filtered scopes.
	ErrWrongScopeType = errors.New("wrong type of the scope")
)

Functions

This section is empty.

Types

type Analyzer

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

Analyzer is a searcher and analyzer go files.

func New

func New(log *zerolog.Logger, conf *config.Search) *Analyzer

New returns new analyzer with validated config.

func (*Analyzer) Run

func (a *Analyzer) Run(ctx context.Context) ([]*model.Interface, error)

Run runs file analyze using seted config params. Collects files to analyze and parses them to collect interface types.

Jump to

Keyboard shortcuts

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