licenses

package
v21.1.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Name     string       `json:",omitempty"` // A license name, such as gnu-gpl-v2
	Paren    *Condition   `json:",omitempty"` // A parenthesized expression
	And      bool         `json:",omitempty"` // license1 AND license2
	Or       bool         `json:",omitempty"` // license1 OR license2
	Children []*Condition `json:",omitempty"` // The operands of And and Or
}

Condition describes the syntax of a complex license condition. It has either Name or Paren or Children set. In the Children case, either And or Or specify the operators used. Only malformed license conditions can have both And and Or set.

func Parse

func Parse(licenses string) *Condition

func (*Condition) String

func (cond *Condition) String() string

func (*Condition) Walk

func (cond *Condition) Walk(callback func(*Condition))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳