mirror of https://github.com/rwxrob/bonzai
Add Log method to scanner and its cursor
parent
2b9195ec9d
commit
fb9eec2d5b
@ -1,13 +1,24 @@
|
|||||||
package scan_test
|
package scan_test
|
||||||
|
|
||||||
import "github.com/rwxrob/bonzai/scan"
|
import (
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/rwxrob/bonzai/scan"
|
||||||
|
)
|
||||||
|
|
||||||
func ExampleCur() {
|
func ExampleCur() {
|
||||||
|
defer log.SetOutput(os.Stderr)
|
||||||
|
defer log.SetFlags(log.Flags())
|
||||||
|
log.SetOutput(os.Stdout)
|
||||||
|
log.SetFlags(0)
|
||||||
m := new(scan.Cur)
|
m := new(scan.Cur)
|
||||||
m.Print()
|
m.Print()
|
||||||
m.NewLine()
|
m.NewLine()
|
||||||
m.Print()
|
m.Print()
|
||||||
|
m.Log()
|
||||||
//Output:
|
//Output:
|
||||||
// U+0000 '\x00' 0,0-0 (0-1)
|
// U+0000 '\x00' 0,0-0 (0-1)
|
||||||
// U+0000 '\x00' 1,1-1 (0-1)
|
// U+0000 '\x00' 1,1-1 (0-1)
|
||||||
|
// U+0000 '\x00' 1,1-1 (0-1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue