зеркало из https://github.com/golang/build.git
devapp: check for error from s.initCorpus
Also remove superfluous newlines from log strings. Change-Id: I2e0fb408f40e47af3f6ea5149113722b3e1db114 Reviewed-on: https://go-review.googlesource.com/127675 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Родитель
ec760fd405
Коммит
1fadf6bf5a
|
@ -48,14 +48,16 @@ func main() {
|
|||
|
||||
s := newServer(http.NewServeMux(), *staticDir, *templateDir)
|
||||
ctx := context.Background()
|
||||
s.initCorpus(ctx)
|
||||
if err := s.initCorpus(ctx); err != nil {
|
||||
log.Fatalf("Could not init corpus: %v", err)
|
||||
}
|
||||
go s.corpusUpdateLoop(ctx)
|
||||
|
||||
ln, err := net.Listen("tcp", *listen)
|
||||
if err != nil {
|
||||
log.Fatalf("Error listening on %s: %v\n", *listen, err)
|
||||
log.Fatalf("Error listening on %s: %v", *listen, err)
|
||||
}
|
||||
log.Printf("Listening on %s\n", ln.Addr())
|
||||
log.Printf("Listening on %s", ln.Addr())
|
||||
|
||||
errc := make(chan error)
|
||||
if ln != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче