locks + message helper rename

This commit is contained in:
ycc
2022-12-03 00:05:28 +01:00
parent a5cf1ec7ac
commit 023a3c701a
7 changed files with 19 additions and 19 deletions

View File

@ -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
}