Commit Graph

8 Commits

Author SHA1 Message Date
Anton Kaliaev 4123d54bf6
change service#Start to return just error (Refs #45)
```
@melekes
yeah, bool is superfluous
@ethanfrey
If I remember correctly when I was writing test code, if I call Start() on a Service that is already running, it returns (false, nil). Only if I try to legitimately start it, but it fails in startup do I get an error.
The distinction is quite important to make it safe for reentrant calls. The other approach would be to have a special error type like ErrAlreadyStarted, then check for that in your code explicitly. Kind of like if I make a db call in gorm, and get an error, I check if it is a RecordNotFound error, or whether there was a real error with the db query.
@melekes
Ah, I see. Thanks. I must say I like ErrAlreadyStarted approach more (not just in Golang)
```
2017-11-06 12:18:04 -05:00
Silas Davis 0eff425bc7
fix zeroed buffer getting flushed to the empty event 2017-10-23 18:52:31 +01:00
Zach Ramsay d6e03d2368 linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
Anton Kaliaev ed76afd409
Logger interface and tmLogger impl based on go-kit 2017-05-05 21:43:07 +04:00
Ethan Buchman df250b6941 docs: go-events -> tmlibs/events 2017-04-21 16:25:23 -04:00
Ethan Buchman 2f8551d3b6 go-common -> tmlibs 2017-04-18 17:56:05 -04:00
Ethan Buchman 900be74e8f update import paths 2017-04-18 16:33:51 -04:00
Ethan Buchman fe92e62a19 merge go-events 2017-04-18 16:33:40 -04:00