Beispiel #1
0
func printInfo(info *tasks.Info, out io.Writer) error {
	p := printer.New(out)
	p.Printf("// %s", info.Domain)
	p.Println()

	info.PrintTo(p)

	return p.Error
}
Beispiel #2
0
func newCursor(t *Term) *cursor {
	ret := new(cursor)

	ret.Term = t
	ret.stack = newStack()
	ret.Printer = printer.New(t.Log)

	return ret
}
Beispiel #3
0
Datei: term.go Projekt: h8liu/d8
func (self *Term) T(t Task) (*Branch, error) {
	ret, e := newCursor(self).T(t)
	self.done++

	if e == nil {
		p := printer.New(self.Out)
		t.PrintTo(p)
	}

	return ret, e
}
Beispiel #4
0
Datei: info.go Projekt: h8liu/d8
func (self *Info) Out() string {
	ret := new(bytes.Buffer)
	p := printer.New(ret)
	self.PrintTo(p)
	return ret.String()
}