Skip to content

Commit

Permalink
Add ISC license
Browse files Browse the repository at this point in the history
  • Loading branch information
satreix committed Aug 11, 2016
1 parent 15e5a5e commit af91a1f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions fixtures/licenses/ISC
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) [year(s)], [copyright holder]

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
6 changes: 6 additions & 0 deletions license.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
const (
// Recognized license types
LicenseMIT = "MIT"
LicenseISC = "ISC"
LicenseNewBSD = "NewBSD"
LicenseFreeBSD = "FreeBSD"
LicenseApache20 = "Apache-2.0"
Expand Down Expand Up @@ -41,6 +42,7 @@ var DefaultLicenseFiles = []string{
// A slice of standardized license abbreviations
var KnownLicenses = []string{
LicenseMIT,
LicenseISC,
LicenseNewBSD,
LicenseFreeBSD,
LicenseApache20,
Expand Down Expand Up @@ -159,6 +161,10 @@ func (l *License) GuessType() error {
"person obtaining a copy of this software"):
l.Type = LicenseMIT

case scan(comp, "permission to use, copy, modify, and/or distribute this "+
"software for any"):
l.Type = LicenseISC

case scan(comp, "apache license version 2.0, january 2004") ||
scan(comp, "http://www.apache.org/licenses/license-2.0"):
l.Type = LicenseApache20
Expand Down

0 comments on commit af91a1f

Please sign in to comment.