summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorWeijia Wang <wjwang13@fudan.edu.cn>2018-06-05 16:07:40 +0800
committerRyan Dahl <ry@tinyclouds.org>2018-06-05 10:07:40 +0200
commit8094c7421b50d3cbbc0eace6d376d7ed31b3cfa1 (patch)
tree183ec11b6a4200f479350eb309869f5b3ce80dc7 /main.go
parent874db2a334eeaccd5f991e1e979073d75ba2932b (diff)
Use check() to improve error check (#139)
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/main.go b/main.go
index 6bb28fd49..465c8b5ea 100644
--- a/main.go
+++ b/main.go
@@ -76,9 +76,7 @@ func Init() {
// Use --prof for profiling JS.
if *flagGoProf != "" {
f, err := os.Create(*flagGoProf)
- if err != nil {
- panic(err)
- }
+ check(err)
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}