Documentation
¶
Overview ¶
Package pkgproxy provides functions for getting Go package data from pkg.go.dev.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Package ¶
type Package struct {
Name string `json:"name"`
Repository string `json:"repository"`
Version string `json:"version"`
PublishedDate string `json:"publishedDate"`
License string `json:"license"`
Imports string `json:"imports"`
ImportedBy string `json:"importedBy"`
ValidGoMod string `json:"validGomod"`
RedistributableLicense string `json:"redistributableLicense"`
TaggedVersion string `json:"taggedVersion"`
StableVersion string `json:"stableVersion"`
}
Package represents information about Go package received from the pkg.go.dev.
type PkgCollector ¶
PkgCollector represents the web scraper (collector).
func NewPkgCollector ¶
func NewPkgCollector() *PkgCollector
NewPkCollector configures and returns defualt PkgCollector ready to interact with pkg.go.dev.
The collector creates a default cache dir `.pkg_cache`.
func (*PkgCollector) Get ¶
func (p *PkgCollector) Get(pkgName string) Package
Get takes the Go package name, collects information and returns Package type populated with data.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
pkg
command
|
|
|
examples
|
|
|
custom_colly_collector
command
|
|
|
simple
command
|
|
|
simple_json
command
|
Click to show internal directories.
Click to hide internal directories.