This commit is contained in:
Alex Yatskov 2015-10-30 20:45:21 +09:00
parent 8b9d841c7c
commit 512dfcb953
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ type goldsmith struct {
wg sync.WaitGroup wg sync.WaitGroup
} }
func NewGoldsmith(srcPath, dstPath string) (Applier, error) { func NewGoldsmith(srcPath, dstPath string) (Goldsmith, error) {
gs := &goldsmith{srcPath: srcPath, dstPath: dstPath} gs := &goldsmith{srcPath: srcPath, dstPath: dstPath}
if err := gs.scan(); err != nil { if err := gs.scan(); err != nil {
return nil, err return nil, err
@ -94,7 +94,7 @@ func (gs *goldsmith) NewFile(path string) File {
return &file{path, make(map[string]interface{}), nil} return &file{path, make(map[string]interface{}), nil}
} }
func (gs *goldsmith) Apply(p Processor) Applier { func (gs *goldsmith) Apply(p Processor) Goldsmith {
s := gs.stage() s := gs.stage()
gs.wg.Add(1) gs.wg.Add(1)

View File

@ -45,7 +45,7 @@ type Processor interface {
Process(ctx Context, input chan File, output chan File) error Process(ctx Context, input chan File, output chan File) error
} }
type Applier interface { type Goldsmith interface {
Apply(p Processor) Applier Apply(p Processor) Goldsmith
Complete() Complete()
} }