{"id":18247010,"url":"https://github.com/osspkg/go-badges","last_synced_at":"2025-04-08T19:35:20.538Z","repository":{"id":57706800,"uuid":"502167240","full_name":"osspkg/go-badges","owner":"osspkg","description":"The library generates badges for go","archived":false,"fork":false,"pushed_at":"2024-01-08T08:22:20.000Z","size":3651,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T15:17:01.514Z","etag":null,"topics":["badge","badges","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osspkg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T20:04:03.000Z","updated_at":"2023-06-18T12:28:01.000Z","dependencies_parsed_at":"2023-07-27T22:13:17.879Z","dependency_job_id":"26f2ab1b-8338-4061-baa5-434a533cc318","html_url":"https://github.com/osspkg/go-badges","commit_stats":null,"previous_names":["osspkg/go-badges","deweppro/go-badges"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fgo-badges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fgo-badges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fgo-badges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osspkg%2Fgo-badges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osspkg","download_url":"https://codeload.github.com/osspkg/go-badges/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247912957,"owners_count":21017068,"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":["badge","badges","go","golang"],"created_at":"2024-11-05T09:28:34.553Z","updated_at":"2025-04-08T19:35:20.520Z","avatar_url":"https://github.com/osspkg.png","language":"Go","readme":"# go-badges\n\n[![Release](https://img.shields.io/github/release/osspkg/go-badges.svg?style=flat-square)](https://github.com/osspkg/go-badges/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/osspkg/go-badges)](https://goreportcard.com/report/github.com/osspkg/go-badges)\n[![CI](https://github.com/osspkg/go-badges/actions/workflows/ci.yml/badge.svg)](https://github.com/osspkg/go-badges/actions/workflows/ci.yml)\n\n## Install\n\n```sh\ngo get -u go.osspkg.com/badges\n```\n\n## Colors\n\n```go\nColorPrimary  \nColorSecondary \nColorSuccess   \nColorDanger   \nColorWarning  \nColorInfo      \nColorLight\n```\n\n## Examples\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\n\t\"go.osspkg.com/badges\"\n)\n\nfunc main() {\n\tb, err := badges.New()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\thttp.Handle(\"/image.svg\", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\ttitle := r.URL.Query().Get(\"title\")\n\t\tcontent := r.URL.Query().Get(\"data\")\n\n\t\terr = b.WriteResponse(w, badges.ColorInfo, title, content)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}))\n\n\thttp.Handle(\"/\", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t_, err = w.Write([]byte(\"\u003chtml\u003e\u003cbody\u003e\u003cimg src=\\\"/image.svg?title=User ID\u0026data=12 34 567890\\\"\u003e\u003c/body\u003e\u003c/html\u003e\"))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}))\n\n\tif err = http.ListenAndServe(\":8080\", nil); err != nil {\n\t\tpanic(err)\n\t}\n}\n\n```\n\n## License\n\nBSD-3-Clause License. See the LICENSE file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosspkg%2Fgo-badges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosspkg%2Fgo-badges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosspkg%2Fgo-badges/lists"}