yeast/impl/echo.go

13 lines
235 B
Go
Raw Normal View History

2015-02-11 01:41:51 +07:00
package impl
// Implementation of a echo unit
// Comes handy when you need to mock a unit
2015-02-11 19:33:46 +07:00
func Echo(name string) *Impl {
2015-02-11 01:41:51 +07:00
return &Impl{
2015-02-11 19:33:46 +07:00
name: name,
actor: func(data []byte) (resp []byte, err error) {
2015-02-11 01:41:51 +07:00
return data, nil
},
}
}