This is a created article in which the information may have evolved or changed.
Package Listen Utilimport ("Github.com/qpliu/qrencode-go/qrencode" "image/png" "io" "net/http") const Listen (Eclevelm listen = Listen to Qrencode. Eclevel (0) Eclevell listen = listen to Qrencode. Eclevel (1) Eclevelh listen = listen to Qrencode. Eclevel (2) ECLEVELQ listen = listen to Qrencode. Eclevel (3)) Func Listen to NEWHTTPQR (W listen to HTTP. Responsewriter, listen to str listen to string) listen to error {W.header (). Set ("ContentType", Listen "image/png") bit, listen to _ Listen: = Listen to Qrencode. Encode (str, listen Eclevelm) img Listen: = Listen bit. Imagewithmargin (10, listen 1) Return to listen to PNG. Encode (w, listen img)}func listen to NEWQR (w listen io. Writer, listen to str listen to string) listen to the error listen {bit, listen to _ Listen: = Listen to Qrencode. Encode (str, listen Eclevelm) img Listen: = Listen bit. Imagewithmargin (10, listen 1) Return to listen to PNG. Encode (w, listen img)}