]> git.wincent.com - passage.git/commitdiff
Write results back over socket
authorGreg Hurrell <greg@hurrell.net>
Thu, 8 Dec 2016 03:14:40 +0000 (19:14 -0800)
committerGreg Hurrell <greg@hurrell.net>
Thu, 8 Dec 2016 03:14:40 +0000 (19:14 -0800)
passage.go

index 5603036a14a59583fa19aa68f03f9a3180a458af..c470ea4edf0b64e7131d9579c0cb72683425d403 100644 (file)
@@ -2,7 +2,6 @@ package main
 
 import (
        "encoding/json"
-       "fmt"
        "github.com/keybase/go-keychain"
        "log"
        "net"
@@ -73,9 +72,9 @@ func handleConnection(conn net.Conn) {
        if err != nil {
                log.Print(err)
        } else if len(results) != 1 {
-               log.Print("not found")
+               log.Print("Item not found")
        } else {
-               password := string(results[0].Data)
-               fmt.Printf(password)
+               conn.Write(results[0].Data)
+               log.Print("Wrote")
        }
 }