skip2 / go-qrcode

:sparkles: QR Code encoder (Go)
http://go-qrcode.appspot.com
MIT License
2.64k stars 338 forks source link

Set DataMode manually #58

Open stokito opened 2 years ago

stokito commented 2 years ago

The classifyDataModes() method tries to detect which dataModeNumeric, dataModeAlphanumeric or dataModeByte to use. Interesting that there is also Japan mode which is not supported. Maybe it makes sense to support it?

I have to generate many qr codes as fast as possible so I want to set the mode manually to skip this detection.

Can we create a new field in the config to preset the mode?

The https://github.com/yeqown/go-qrcode allows to do that.