{"id":16674420,"url":"https://github.com/settermjd/go-qr-code-generator","last_synced_at":"2025-07-11T16:39:08.575Z","repository":{"id":174943503,"uuid":"653050010","full_name":"settermjd/go-qr-code-generator","owner":"settermjd","description":"This is a small repository showing how to generate a QR code with an optional watermark in Go","archived":false,"fork":false,"pushed_at":"2024-08-01T20:32:09.000Z","size":15,"stargazers_count":4,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T20:44:04.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/settermjd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-13T10:04:54.000Z","updated_at":"2024-12-17T03:03:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c9daa11-a342-448f-a9bd-7d95d91fc866","html_url":"https://github.com/settermjd/go-qr-code-generator","commit_stats":null,"previous_names":["settermjd/go-qr-code-generator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/settermjd/go-qr-code-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fgo-qr-code-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fgo-qr-code-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fgo-qr-code-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fgo-qr-code-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/settermjd","download_url":"https://codeload.github.com/settermjd/go-qr-code-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fgo-qr-code-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264853023,"owners_count":23673553,"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":[],"created_at":"2024-10-12T12:43:09.241Z","updated_at":"2025-07-11T16:39:08.553Z","avatar_url":"https://github.com/settermjd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate a QR code in Go\n\nThis is a small repository showing how to generate a QR code, with an optional watermark, in Go.\n\nThis project is the complete code behind the [\"How to Generate a QR Code with Go\"][tutorial-url] tutorial on the Twilio blog.\n\n## Prerequisites\n\nTo follow along with the tutorial, you don't need much, just the following things:\n\n- [Go][go-url] (a recent version, or the latest, 1.20.5)\n- [Curl][curl-url] or [Postman][postman-url]\n- A smartphone with a QR code scanner (which, these days, most of them should have)\n\n## Start the application\n\nTo start the application, run the following command:\n\n```bash\ngo run main.go\n```\n\n## Generate a QR code\n\nTo generate a QR code, send a POST request to http://localhost:8080/generate with two POST variables:\n\n- **size**: This sets the width and height of the QR code\n- **url**: This is the URL that the QR code will embed\n\nThe curl example, below, shows how to create a QR code 256x256 px that embeds \"https://arstechnica.com\", and outputs the generated QR code to _data/qrcode.png_.\n\n```bash\ncurl -X POST \\\n    --form \"size=256\" \\\n    --form \"url=https://arstechnica.com\" \\\n    --output data/qrcode.png \\\n    http://localhost:8080/generate\n```\n\nYou can also watermark the QR code, by uploading a PNG file using the `watermark` POST variable.\nBelow is an example of how to do so with curl.\n\n```bash\ncurl -X POST \\\n    --form \"size=256\" \\\n    --form \"url=https://matthewsetter.com\" \\\n    --form \"watermark=@data/twilio-logo.png\" \\\n    --output data/qrcode.png \\\n    http://localhost:8080/generate\n```\n\n[tutorial-url]: https://www.twilio.com/blog/generate-qr-code-with-go\n[go-url]: https://go.dev/\n[curl-url]: https://curl.se/\n[postman-url]: https://www.postman.com/downloads/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettermjd%2Fgo-qr-code-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsettermjd%2Fgo-qr-code-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettermjd%2Fgo-qr-code-generator/lists"}