This is a simple Go application that generates a QR code for a specified URL and saves it as a PNG file. The project uses the go-qrcode library.
- Generates a QR code for any URL.
- Saves the QR code as a PNG image.
- Easy to customize and extend.
- Go installed on your machine. Download it from golang.org.
- The go-qrcodelibrary (automatically installed via thego getcommand).
- 
Clone this repository or create a new directory for the project: git clone https://github.com/sun01822/qr_code_generator_using_golang.git cd qr_code_generator_go
- 
Install the required library: go get -u github.com/skip2/go-qrcode 
- 
Build and run the application: go run main.go 
- 
Open the main.gofile.
- 
Replace the URL "http://github.com/sun01822"with the URL for which you want to generate a QR code.
- 
Run the application using: go run main.go 
- 
The QR code will be saved as qrcode.pngin the same directory as the application.
By default, this application generates a QR code for the URL http://github.com/sun01822 and saves it as qrcode.png.
Replace the URL string in the main.go file with your desired URL:
err := qrcode.WriteFile("http://example.com", qrcode.High, 256, "qrcode.png")Modify the size parameter (e.g., 256) to change the dimensions of the QR code:
err := qrcode.WriteFile("http://example.com", qrcode.High, 512, "qrcode.png")- skip2/go-qrcode: A Go library for generating QR codes.
This project is open-source and available under the MIT License.
Developed by MD. Shariar Hossain Sun.
Feel free to reach out for contributions or issues!
