{"id":20532459,"url":"https://github.com/joshdk/licensor","last_synced_at":"2025-04-14T06:31:24.492Z","repository":{"id":57612337,"uuid":"112904447","full_name":"joshdk/licensor","owner":"joshdk","description":"📝 Detect what license a project is distributed under","archived":false,"fork":false,"pushed_at":"2018-09-11T16:12:08.000Z","size":14712,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T20:12:31.327Z","etag":null,"topics":["compliance","golang","license","license-checking","license-management","license-scan","licenses","oss","oss-compliance","spdx","spdx-license"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-03T06:03:05.000Z","updated_at":"2022-06-10T00:15:51.000Z","dependencies_parsed_at":"2022-08-27T09:51:29.920Z","dependency_job_id":null,"html_url":"https://github.com/joshdk/licensor","commit_stats":null,"previous_names":["joshdk/license"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Flicensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Flicensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Flicensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshdk%2Flicensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshdk","download_url":"https://codeload.github.com/joshdk/licensor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248833172,"owners_count":21168811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compliance","golang","license","license-checking","license-management","license-scan","licenses","oss","oss-compliance","spdx","spdx-license"],"created_at":"2024-11-16T00:15:01.833Z","updated_at":"2025-04-14T06:31:24.411Z","avatar_url":"https://github.com/joshdk.png","language":"Shell","readme":"[![License](https://img.shields.io/github/license/joshdk/licensor.svg)](https://opensource.org/licenses/MIT)\n[![GoDoc](https://godoc.org/github.com/joshdk/licensor?status.svg)](https://godoc.org/github.com/joshdk/licensor)\n[![Go Report Card](https://goreportcard.com/badge/github.com/joshdk/licensor)](https://goreportcard.com/report/github.com/joshdk/licensor)\n[![CircleCI](https://circleci.com/gh/joshdk/licensor.svg?\u0026style=shield)](https://circleci.com/gh/joshdk/licensor/tree/master)\n\n# Licensor\n\n📝 Detect what license a project is distributed under\n\n## Installing\n\nYou can fetch this library by running the following\n\n    go get -u github.com/joshdk/licensor\n\n## Usage\n\n```go\nimport (\n\t\"fmt\"\n\t\"github.com/joshdk/licensor\"\n)\n\n// Example content from https://github.com/golang/go/blob/master/LICENSE\nconst unknown = `\n\tCopyright (c) 2009 The Go Authors. All rights reserved.\n\tRedistribution and use in source and binary forms, with or without\n\t...\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\tOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n`\n\n// Find license that is the closest match \nmatch := licensor.Best([]byte(unknown))\n\nfmt.Printf(\"License name:     %s\\n\",   match.License.Name)\nfmt.Printf(\"SPDX identifier:  %s\\n\",   match.License.Identifier)\nfmt.Printf(\"Match confidence: %.2f\\n\", match.Confidence)\n// License name:     BSD 3-clause \"New\" or \"Revised\" License\n// SPDX identifier:  BSD-3-Clause\n// Match confidence: 0.96\n```\n\n## License\n\nThis library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE.txt for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Flicensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshdk%2Flicensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshdk%2Flicensor/lists"}