Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "0.0.1"
Variables ¶
View Source
var ErrNoConfidentLicense = fmt.Errorf("no confident license found in file")
View Source
var ErrNoLicenseFile = fmt.Errorf("no license file found")
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
func ParseDependency ¶
func ParseDependency(modline []byte) (Dependency, error)
func (Dependency) GetLicense ¶
func (d Dependency) GetLicense() (License, error)
func (Dependency) MarshalJSON ¶
func (d Dependency) MarshalJSON() ([]byte, error)
func (Dependency) String ¶
func (d Dependency) String() string
func (*Dependency) UnmarshalJSON ¶
func (d *Dependency) UnmarshalJSON(b []byte) error
type ModLicenses ¶
type ModLicenses struct {
Licenses map[Dependency]License `json:"licenses"`
}
func FromDir ¶
func FromDir(dir string) (ModLicenses, error)
func FromModFilePath ¶
func FromModFilePath(modpath string) (ModLicenses, error)
func FromModfile ¶
func FromModfile(r io.Reader) (ModLicenses, error)
func FromWD ¶
func FromWD() (ModLicenses, error)
func (ModLicenses) MarshalJSON ¶
func (ml ModLicenses) MarshalJSON() ([]byte, error)
func (*ModLicenses) UnmarshalJSON ¶
func (ml *ModLicenses) UnmarshalJSON(in []byte) error
Click to show internal directories.
Click to hide internal directories.