summary refs log tree commit diff stats
path: root/svc/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'svc/init.go')
-rw-r--r--svc/init.go18
1 files changed, 14 insertions, 4 deletions
diff --git a/svc/init.go b/svc/init.go
index aed3449..8e9bb20 100644
--- a/svc/init.go
+++ b/svc/init.go
@@ -40,6 +40,18 @@ var remoteRegistries = &RemoteRegistries{}
 
 var staticCache = &staticAssets{}
 
+func errFatal(context string, err error) {
+	if err != nil {
+		log.Fatalf(context+"%v\n", err.Error())
+	}
+}
+
+func errLog(context string, err error) {
+	if err != nil {
+		log.Printf(context+"%v\n", err.Error())
+	}
+}
+
 // I'm not using init() because it runs
 // even during testing and was causing
 // problems.
@@ -92,10 +104,8 @@ func watchForInterrupt() {
 
 			case *dbLevel:
 				lvl := dbType
-				if err := lvl.db.Close(); err != nil {
-					log.Printf("%v\n", err.Error())
-				}
-
+				err := lvl.db.Close()
+				errLog("", err)
 			}
 
 			if !confObj.StdoutLogging {
>
b3cdcdd4 ^

c517316b ^


b38d7fff ^
a6d9bd9b ^


e3894819 ^
b38d7fff ^
a6d9bd9b ^



1ae4e0d9 ^
a6d9bd9b ^
31a9d39e ^

a6d9bd9b ^
2e534c0e ^
1ae4e0d9 ^
b94f150a ^
1ae4e0d9 ^
fbf0536d ^


fbf0536d ^
de612c49 ^
b38d7fff ^
e3894819 ^
1ae4e0d9 ^
fc2046a1 ^
1ead3562 ^
38f0b91a ^
1ead3562 ^
70f70118 ^
04afb4b0 ^
426009da ^
b38d7fff ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68