Skip to content
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 ".rst" suffix to the pile #11

Open
client9 opened this issue Oct 18, 2015 · 2 comments
Open

Add ".rst" suffix to the pile #11

client9 opened this issue Oct 18, 2015 · 2 comments

Comments

@client9
Copy link
Contributor

client9 commented Oct 18, 2015

https://en.wikipedia.org/wiki/ReStructuredText

https://www.google.com/search?client=safari&rls=en&q=site:github.com+copyleft&ie=UTF-8&oe=UTF-8#q=site:github.com+license.rst

site:github.com copying.st

etc

@client9
Copy link
Contributor Author

client9 commented Oct 18, 2015

@client9
Copy link
Contributor Author

client9 commented Oct 19, 2015

FWIW, In another project, I just ignore the filename suffix to produce a list of candidates.

Seems to be ok.

// LicenseFilePrefix is a list of filename prefixes that indicate it
//  might contain a software license
var LicenseFilePrefix = []string{
        "license",
        "copying",
        "unlicensed",
//Mine has "copyright" and "copyleft" too
}

// IsPossibleLicenseFile returns true if the filename might be contain a software license
func IsPossibleLicenseFile(filename string) bool {
        lowerfile := strings.ToLower(filename)
        for _, prefix := range LicenseFilePrefix {
                if strings.HasPrefix(lowerfile, prefix) {
                        return true
                }
        }
        return false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant