Documentation
¶
Overview ¶
Package ecosystem provides a parser and mappings for ecosystem strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parsed ¶
Parsed represents an ecosystem-with-suffix string as defined by the spec, parsed into a structured format.
The suffix is optional and is separated from the ecosystem by a colon.
For example, "Debian:7" would be parsed into Parsed{Ecosystem: constants.EcosystemDebian, Suffix: "7"}
func MustParse ¶
MustParse parses a string into a constants.Ecosystem and an optional suffix specified with a ":" Panics if there is an invalid ecosystem
func Parse ¶
Parse parses a string into a constants.Ecosystem and an optional suffix specified with a ":"
func (Parsed) MarshalJSON ¶
MarshalJSON handles marshals a Parsed struct into a JSON string.
This method implements the json.Marshaler interface.
func (*Parsed) UnmarshalJSON ¶
UnmarshalJSON handles unmarshalls a JSON string into a Parsed struct.
This method implements the json.Unmarshaler interface.