mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-09 16:42:26 +00:00
vendor: add depends
This commit is contained in:
28
vendor/github.com/chai2010/image/qrencoder/hello.go
generated
vendored
Normal file
28
vendor/github.com/chai2010/image/qrencoder/hello.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ingore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
qr "github.com/chai2010/image/qrencoder"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c, err := qr.Encode("hello, world", qr.L)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = ioutil.WriteFile("zz_qrout.png", c.PNG(), 0666)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Print("output: zz_qrout.png\n")
|
||||
}
|
Reference in New Issue
Block a user