locks + message helper rename
This commit is contained in:
@ -159,10 +159,10 @@ func (Contact *ContactCard) WriteQr(filename string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ReadQr(Filename string) ContactCard {
|
||||
func ReadQr(filename string) *ContactCard {
|
||||
var contact ContactCard
|
||||
// open and decode image file
|
||||
file, _ := os.Open("qrcode.jpg")
|
||||
file, _ := os.Open(filename)
|
||||
img, _, _ := image.Decode(file)
|
||||
|
||||
// prepare BinaryBitmap
|
||||
@ -173,5 +173,5 @@ func ReadQr(Filename string) ContactCard {
|
||||
result, _ := qrReader.Decode(bmp, nil)
|
||||
|
||||
fmt.Println(result)
|
||||
return contact
|
||||
return &contact
|
||||
}
|
||||
|
Reference in New Issue
Block a user