blob: b6686f829068c7c7f74d6e0cba549a1a8a11b2fa [file] [log] [blame]
// +build ignore,OMIT
package binary // OMIT
func ExampleWrite() {
var buf bytes.Buffer
var pi float64 = math.Pi
err := binary.Write(&buf, binary.LittleEndian, pi)
if err != nil {
fmt.Println("binary.Write failed:", err)
}
fmt.Printf("% x", buf.Bytes())
// Output: 18 2d 44 54 fb 21 09 40
}