depcrawler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package depcrawler implements functionality to traverse specified packages and collect information about their exported symbols and dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

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

Crawler is an object capable of examining package trees

func New

func New(patterns string, options ...Option) (*Crawler, error)

New creates a new Crawler instance

func (*Crawler) Get

func (c *Crawler) Get() (map[string]*archer.Package, error)

Get traverses the package matching specified patterns and builds the list of packages and dependencies

type Option

type Option func(c *Crawler) error

Option is an option that can be passed to Crawler's constructor

func WithConcrete

func WithConcrete(concrete ...string) Option

WithConcrete is used to provide a list of concrete packages that should not be widely dependent on

func WithDir

func WithDir(dir string) Option

WithDir allows you to set the directory in which the project is located

func WithIgnore

func WithIgnore(ignore ...string) Option

WithIgnore is used to provide a list of packages dependencies on which should be ignored when analyzing concrete dependencies.

func WithTests

func WithTests() Option

WithTests indicates that the crawler should include test files when looking for exported symbols and dependencies

Jump to

Keyboard shortcuts

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