scanner

package
v0.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposerScanner

type ComposerScanner struct{}

ComposerScanner scans composer.json for PHP dependencies

func (*ComposerScanner) Detect

func (s *ComposerScanner) Detect(projectPath string) bool

Detect checks for composer.json

func (*ComposerScanner) Scan

func (s *ComposerScanner) Scan(projectPath string) ([]string, error)

Scan reads composer.json and returns package names

type CsprojScanner

type CsprojScanner struct{}

CsprojScanner scans .csproj files for .NET dependencies

func (*CsprojScanner) Detect

func (s *CsprojScanner) Detect(projectPath string) bool

Detect checks for .csproj files

func (*CsprojScanner) Scan

func (s *CsprojScanner) Scan(projectPath string) ([]string, error)

Scan reads .csproj and returns package references

type GemfileScanner

type GemfileScanner struct{}

GemfileScanner scans Gemfile for Ruby dependencies

func (*GemfileScanner) Detect

func (s *GemfileScanner) Detect(projectPath string) bool

Detect checks for Gemfile

func (*GemfileScanner) Scan

func (s *GemfileScanner) Scan(projectPath string) ([]string, error)

Scan reads Gemfile and returns gem names

type GoModScanner

type GoModScanner struct{}

GoModScanner scans go.mod files for module requirements

func NewGoModScanner

func NewGoModScanner() *GoModScanner

func (*GoModScanner) Detect

func (s *GoModScanner) Detect(projectPath string) bool

func (*GoModScanner) Scan

func (s *GoModScanner) Scan(projectPath string) ([]string, error)

type MavenScanner

type MavenScanner struct{}

MavenScanner scans pom.xml for Java dependencies

func (*MavenScanner) Detect

func (s *MavenScanner) Detect(projectPath string) bool

Detect checks for pom.xml

func (*MavenScanner) Scan

func (s *MavenScanner) Scan(projectPath string) ([]string, error)

Scan reads pom.xml and returns dependency coordinates

type NpmScanner

type NpmScanner struct{}

NpmScanner scans package.json dependencies

func NewNpmScanner

func NewNpmScanner() *NpmScanner

func (*NpmScanner) Detect

func (s *NpmScanner) Detect(projectPath string) bool

func (*NpmScanner) Scan

func (s *NpmScanner) Scan(projectPath string) ([]string, error)

type PipScanner

type PipScanner struct{}

PipScanner scans requirements.txt for Python dependencies

func (*PipScanner) Detect

func (s *PipScanner) Detect(projectPath string) bool

Detect checks for requirements.txt

func (*PipScanner) Scan

func (s *PipScanner) Scan(projectPath string) ([]string, error)

Scan reads requirements.txt and returns package names

type Scanner

type Scanner interface {
	// Detect returns true if the project path appears to be managed by this scanner
	Detect(projectPath string) bool
	// Scan returns a list of dependency coordinates (import paths or package names)
	Scan(projectPath string) ([]string, error)
}

Scanner detects and enumerates project dependencies for a given language/ecosystem

func NewComposerScanner

func NewComposerScanner() Scanner

NewComposerScanner creates a new composer scanner

func NewCsprojScanner

func NewCsprojScanner() Scanner

NewCsprojScanner creates a new csproj scanner

func NewGemfileScanner

func NewGemfileScanner() Scanner

NewGemfileScanner creates a new Gemfile scanner

func NewMavenScanner

func NewMavenScanner() Scanner

NewMavenScanner creates a new Maven scanner

func NewPipScanner

func NewPipScanner() Scanner

NewPipScanner creates a new pip scanner

Jump to

Keyboard shortcuts

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