-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add license restrictions #1382
Add license restrictions #1382
Conversation
type LicenseConstraints map[string]Restrictions | ||
|
||
type Restrictions struct { | ||
Constraint string `json:"constraint"` | ||
// +optional | ||
Distributions []string `json:"distributions,omitempty"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about ..
type LicenseRestrictions map[string]Restriction
type Restriction struct {
Constraint string `json:"constraint"`
// +optional
Distributions []string `json:"distributions,omitempty"`
}
LicenseConstraints -> LicenseRestrictions
Restrictions -> Restriction
Not mixing "constraint" & "restriction" stufffs
if err != nil || !ok { | ||
return false, err | ||
} | ||
if !contains(restriction.Distributions, strDistro) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can support disrtibution *
here.
Signed-off-by: Tamal Saha <[email protected]>
No description provided.