Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Convention ¶
func NewConvention ¶
func NewConvention(name string, rules []Rule) *Convention
noinspection GoUnusedExportedFunction
func (*Convention) Evaluate ¶
func (c *Convention) Evaluate() error
func (*Convention) Print ¶
func (c *Convention) Print() error
type Identifier ¶
type License ¶
type License struct { SupersededBy *string `json:"superseded_by"` Identifiers []Identifier `json:"identifiers"` Text []Text `json:"text"` OtherNames *[]OtherName `json:"other_names"` Id string `json:"id"` Links []Link `json:"links"` Name string `json:"name"` Keywords []string `json:"keywords"` }
func (License) PrintDetails ¶
type Licenses ¶
type Licenses []License
This type alias allows us to create a sort of "dao" atop the set of data. see Go in Action Chapter 2 for somewhat similar approach.
func (Licenses) FindByKeyword ¶
enable querying by keyword (e.g. "popular")
type Rule ¶
type Rule struct { Level StrictnessLevel Type RuleType Value string }
func NewRule ¶
func NewRule(level StrictnessLevel, ruleType RuleType, value string) *Rule
noinspection GoUnusedExportedFunction
func (*Rule) MarshalJSON ¶
func (*Rule) UnmarshalJSON ¶
type StrictnessLevel ¶
type StrictnessLevel int
const ( Prohibited StrictnessLevel = iota Optional Preferred Required )
Click to show internal directories.
Click to hide internal directories.