Browse Source

docs: remove return code in normal case from go built-in example (#6841)

An explicit exit prevents the deferred cleanup code from running. In this case,
falling off the end of main will achieve the same goal as an explicit exit.
pull/6874/head
Jeeyong Um 3 years ago
committed by GitHub
parent
commit
c9347a0647
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      docs/tutorials/go-built-in.md

+ 0
- 2
docs/tutorials/go-built-in.md View File

@ -388,7 +388,6 @@ func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
<-c
os.Exit(0)
}
func newTendermint(app abci.Application, configFile string) (*nm.Node, error) {
@ -564,7 +563,6 @@ defer func() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
<-c
os.Exit(0)
```
## 1.5 Getting Up and Running


Loading…
Cancel
Save