{"id":37878744,"url":"https://github.com/go-http-utils/negotiator","last_synced_at":"2026-01-16T16:46:52.214Z","repository":{"id":57481116,"uuid":"73062413","full_name":"go-http-utils/negotiator","owner":"go-http-utils","description":":postbox:An HTTP content negotiator for Go","archived":false,"fork":false,"pushed_at":"2017-07-05T15:41:39.000Z","size":22,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-19T03:05:39.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/go-http-utils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-07T09:28:11.000Z","updated_at":"2024-06-19T03:05:39.631Z","dependencies_parsed_at":"2022-09-26T17:50:39.130Z","dependency_job_id":null,"html_url":"https://github.com/go-http-utils/negotiator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/go-http-utils/negotiator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-http-utils%2Fnegotiator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-http-utils%2Fnegotiator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-http-utils%2Fnegotiator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-http-utils%2Fnegotiator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-http-utils","download_url":"https://codeload.github.com/go-http-utils/negotiator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-http-utils%2Fnegotiator/sbom","scorecard":{"id":431970,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-http-utils/negotiator","commit":"dba3794a997e423e032796131331cce008c3a427"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:35:17.426Z","repository_id":57481116,"created_at":"2025-08-19T03:35:17.426Z","updated_at":"2025-08-19T03:35:17.426Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-16T16:46:51.523Z","updated_at":"2026-01-16T16:46:52.206Z","avatar_url":"https://github.com/go-http-utils.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# negotiator\n\n[![Build Status](https://travis-ci.org/go-http-utils/negotiator.svg?branch=master)](https://travis-ci.org/go-http-utils/negotiator)\n[![Coverage Status](https://coveralls.io/repos/github/go-http-utils/negotiator/badge.svg?branch=master)](https://coveralls.io/github/go-http-utils/negotiator?branch=master)\n\nAn HTTP content negotiator for Go\n\n## Installation\n\n```sh\ngo get -u github.com/go-http-utils/negotiator\n```\n\n## Documentation\n\nAPI documentation can be found here: https://godoc.org/github.com/go-http-utils/negotiator\n\n## Usage\n\n```go\nimport (\n  \"github.com/go-http-utils/negotiator\"\n)\n\nnegotiator := negotiator.New(req.Header)\n```\n\n### Type\n\n```go\n// Assume that the Accept header is \"text/html, application/*;q=0.9, image/jpeg;q=0.8\"\n\nnegotiator.Type()\n// -\u003e \"text/html\"\n\nnegotiator.Type(\"text/html\", \"application/json\", \"image/jpeg\")\n// -\u003e \"text/html\"\n\nnegotiator.Type(\"application/json\", \"image/jpeg\", \"text/plain\")\n// -\u003e \"application/json\"\n\nnegotiator.Type(\"text/plain\")\n// -\u003e \"\"\n```\n\n### Encoding\n\n```go\n// Assume that the Accept-Encoding header is \"gzip, compress;q=0.2, identity;q=0.5\"\n\nnegotiator.Encoding()\n// -\u003e \"gzip\"\n\nnegotiator.Encoding(\"identity\", \"gzip\")\n// -\u003e \"gzip\"\n\nnegotiator.Encoding(\"compress\", \"identity\")\n// -\u003e \"identity\"\n```\n\n### Language\n\n```go\n// Assume that the Accept-Language header is \"en;q=0.8, es, pt\"\n\nnegotiator.Language()\n// -\u003e \"es\"\n\nnegotiator.Language(\"en\", \"es\", \"fr\")\n// -\u003e \"es\"\n\nnegotiator.Language(\"es\", \"pt\")\n// -\u003e \"es\"\n```\n\n### Charset\n\n```go\n// Assume that the Accept-Charset header is \"utf-8, iso-8859-1;q=0.8, utf-7;q=0.2\"\n\nnegotiator.Charset()\n// -\u003e \"utf-8\"\n\nnegotiator.Charset(\"utf-8\", \"iso-8859-1\", \"iso-8859-5\")\n// -\u003e \"utf-8\"\n\nnegotiator.Charset(\"iso-8859-5\")\n// -\u003e \"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-http-utils%2Fnegotiator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-http-utils%2Fnegotiator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-http-utils%2Fnegotiator/lists"}