Initial commit.

This commit is contained in:
2020-02-06 15:09:25 +05:00
commit a7bf1f29ba
22 changed files with 1049 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package parserinterface
import (
// local
"go.dev.pztrn.name/glp/structs"
)
// Interface is a generic parser interface.
type Interface interface {
// Detect should return true if project should be parsed using
// this parser and false otherwise. May optionally return package
// flavor (e.g. dependency management utility name).
Detect(pkgPath string) (bool, string)
// GetDependencies parses project for dependencies.
GetDependencies(flavor string, pkgPath string) []*structs.Dependency
}