summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bleher <tbleher@gmx.de>2018-10-03 23:17:21 +0200
committerThomas Bleher <tbleher@gmx.de>2018-10-03 23:17:21 +0200
commit0b5d00df1069fee4b56b2b67c1490d81395b7ff7 (patch)
tree964149ded87ecc303da5f9caaecaacd0e5c062a9
parent3fa8413d2a985ec310a4370b07496b930a5e0ef1 (diff)
downloadselphy_go-0b5d00df1069fee4b56b2b67c1490d81395b7ff7.tar.gz
selphy_go-0b5d00df1069fee4b56b2b67c1490d81395b7ff7.tar.bz2
selphy_go-0b5d00df1069fee4b56b2b67c1490d81395b7ff7.zip
Correct a few printouts
fmt.Println() does not accept a format string, and separates arguments by spaces automatically.
-rw-r--r--selphy.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/selphy.go b/selphy.go
index fad417c..37ce2b9 100644
--- a/selphy.go
+++ b/selphy.go
@@ -353,10 +353,10 @@ func (c *device) print_data_request(head []byte, body []byte) {
state := 0
if (len(body) < 0x12) {
- fmt.Println("state too short: %d", len(body))
+ fmt.Println("state too short:", len(body))
} else {
state = int(body[0x12])
- fmt.Println("state %d", state)
+ fmt.Println("state", state)
}
/* It frequently seems to repeat the last status response, I suppose
@@ -400,7 +400,7 @@ func (c *device) print_data_request(head []byte, body []byte) {
fmt.Println("Printer reported error.")
os.Exit(1)
default:
- fmt.Println("Printer reported unknown state %d", state)
+ fmt.Println("Printer reported unknown state", state)
os.Exit(1)
}
}
@@ -512,7 +512,7 @@ func (p *printer) start_job() {
func main() {
printer_mac := flag.String("printer_mac", "", "MAC address of printer")
- printer_ip := flag.String("printer_ip", CPNP_ADDR, "IP addres of printer")
+ printer_ip := flag.String("printer_ip", CPNP_ADDR, "IP address of printer")
border := flag.Bool("border", false, "Allow white borders, don't crop")
flag.Parse()