1
0
mirror of https://github.com/kidoman/embd synced 2024-12-21 20:30:05 +01:00

Println doesn't accept formatting.

It looks like this is caused by confusion between `fmt.Println` and `fmt.Printf`.
This commit is contained in:
Wu Jiang 2015-12-22 17:05:28 -05:00
parent 42be169804
commit 1b48067d77

View File

@ -24,25 +24,25 @@ func main() {
panic(err)
}
fmt.Println("received data is: %v", dataBuf)
fmt.Println("received data is:", dataBuf)
dataReceived, err := spiBus.ReceiveData(3)
if err != nil {
panic(err)
}
fmt.Println("received data is: %v", dataReceived)
fmt.Println("received data is:", dataReceived)
dataByte := byte(1)
receivedByte, err := spiBus.TransferAndReceiveByte(dataByte)
if err != nil {
panic(err)
}
fmt.Println("received byte is: %v", receivedByte)
fmt.Println("received byte is:", receivedByte)
receivedByte, err = spiBus.ReceiveByte()
if err != nil {
panic(err)
}
fmt.Println("received byte is: %v", receivedByte)
fmt.Println("received byte is:", receivedByte)
}