You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pump.go
    path of file: ./repos/sealer/vendor/github.com/polydawn/refmt/shared
    
    the code of the file until where you have to start completion: /*
	The `shared` package defines helper types and functions used
	internally by all the other refmt packages; it is not user-facing.
*/
package shared

import (
	"fmt"

	. "github.com/polydawn/refmt/tok"
)

type TokenSource interface {
	Step(fillme *Token) (done bool, err error)
}

ty
    
func (p TokenPump) Run() error {
	var tok Token
	var srcDone, sinkDone bool
	var err error
	for {
		srcDone, err = p.TokenSource.Step(&tok)
		if err != nil {
			return err
		}
		sinkDone, err = p.TokenSink.Step(&tok)
		if err != nil {
			return err
		}
		if srcDone {
			if sinkDone {
				return nil
			}
			return fmt.Errorf("src at end of item but sink expects more")
		}
	}
}