Go to file
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
autofile fix metalinter errors 2017-10-30 13:01:18 -05:00
cli fix metalinter errors 2017-10-30 13:01:18 -05:00
clist linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
common change service#Start to return just error (Refs #45) 2017-11-06 12:18:04 -05:00
db avoid infinite recursion by proxying to iterator 2017-10-17 11:01:46 +04:00
events change service#Start to return just error (Refs #45) 2017-11-06 12:18:04 -05:00
flowrate linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
log linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
logger Logger interface and tmLogger impl based on go-kit 2017-05-05 21:43:07 +04:00
merkle linter: couple fixes 2017-10-03 17:23:14 -04:00
process linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
pubsub linting: next round of fixes 2017-09-22 12:14:27 -04:00
test go-common -> tmlibs 2017-04-18 17:56:05 -04:00
version version and changelog 2017-10-26 20:57:33 -04:00
.gitignore Merge pull request #28 from tendermint/feature/376-events.v2 2017-07-20 15:03:02 -04:00
CHANGELOG.md update changelog 2017-10-27 11:52:10 -04:00
CODEOWNERS add codeowners file [ci skip] 2017-10-11 12:48:05 +04:00
Makefile linter: couple fixes 2017-10-03 17:23:14 -04:00
circle.yml add codecov 2017-10-24 23:36:10 +04:00
glide.lock add missing validator package to glide.yaml 2017-08-11 16:36:26 -04:00
glide.yaml add missing validator package to glide.yaml 2017-08-11 16:36:26 -04:00
merge.sh go-common -> tmlibs 2017-04-18 17:56:05 -04:00
test.sh add codecov 2017-10-24 23:36:10 +04:00