func PipeInit(iReader io.Reader) *Pipe {
	input := make(chan Token)
	output := make(chan string)
	sync := make(chan interface{})
	p := &Pipe{input, output, sync}
	src, err := ioutil.ReadAll(iReader)
	if err != nil {
		panic(err)
	}
	fset := token.NewFileSet()
	file := fset.AddFile("<stdin>", fset.Base(), len(src))
	s := scanner.Scanner{}
	s.Init(file, src, nil, scanner.ScanComments)
	go func() {
		pos, tok, str := s.Scan()
		for tok != token.EOF {
			if len(str) == 0 { str = tok.String() }
			if tok == token.COMMENT {
				str = str + "\n"
			}
			input <- Token{fset.Position(pos), tok, str}
			<-sync  
			pos, tok, str = s.Scan()
		}
		close(input)
	}()
	return p
}
PipeInit initializes a pipeline; input will be read from iReader.
package goprep
import (
	"bytes"
	"fmt"
	"go/parser"
	"go/printer"
	"go/scanner"
	"go/token"
	"io"
	"io/ioutil"
)
type Token struct {
	Pos   token.Position
	Token token.Token
	Str   string
}
type Pipe struct {
	Input  chan Token
	Output chan string
	Sync   chan interface{}
}