~ecs/hq

9ce17917e8a537a028b3ae022101504d6c45e064 — Eyal Sawady 17 days ago 9abcbb6
Drop unused Expr.String()
1 files changed, 0 insertions(+), 25 deletions(-)

M main.go
M main.go => main.go +0 -25
@@ 53,31 53,6 @@ func Select(chs []<-chan Datum) (<-chan Datum, *Datum) {
	return chs[chosen], &d
}

// String stringifies an Expr
func (e Expr) String() string {
	if e.Pipe != nil {
		return "(" + e.Pipe.First.String() + " | " + e.Pipe.Second.String() + ")"
	}
	if e.Multi != nil {
		var s string
		for i, c := range e.Multi.Cmds {
			if i != 0 {
				s += " & "
			}
			s += c.String()
		}
		return "(" + s + " ; " + e.Multi.Out.String() + ")"
	}
	var s string
	for i, c := range e.Cmd {
		if i != 0 {
			s += " "
		}
		s += c
	}
	return "(" + s + ")"
}

// Exec executes an expression
func Exec(e Expr, ins []<-chan Datum, out chan Datum) error {
	if e.Pipe != nil {