aboutsummaryrefslogtreecommitdiffstats
path: root/aerc.go
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-29 22:31:54 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-04 21:57:57 +0200
commit5ca6022d007bc83daba1e7297480d37f56554455 (patch)
treecc592d08276b7f0c8db6a4280bb7fb648b2548fe /aerc.go
parenta8d631177f4315810f0ab7c7d66d38e332ab0916 (diff)
downloadaerc-5ca6022d007bc83daba1e7297480d37f56554455.tar.gz
lint: ensure errors are at least logged (errcheck)
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'aerc.go')
-rw-r--r--aerc.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/aerc.go b/aerc.go
index cd8c4dac..9ce704b0 100644
--- a/aerc.go
+++ b/aerc.go
@@ -164,7 +164,10 @@ func main() {
deferLoop := make(chan struct{})
c := crypto.New(conf.General.PgpProvider)
- c.Init()
+ err = c.Init()
+ if err != nil {
+ logging.Warnf("failed to initialise crypto interface: %v", err)
+ }
defer c.Close()
aerc = widgets.NewAerc(conf, c, func(cmd []string) error {
@@ -205,7 +208,10 @@ func main() {
err := lib.ConnectAndExec(arg)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to communicate to aerc: %v\n", err)
- aerc.CloseBackends()
+ err = aerc.CloseBackends()
+ if err != nil {
+ logging.Warnf("failed to close backends: %v", err)
+ }
return
}
}
@@ -223,5 +229,8 @@ func main() {
time.Sleep(16 * time.Millisecond)
}
}
- aerc.CloseBackends()
+ err = aerc.CloseBackends()
+ if err != nil {
+ logging.Warnf("failed to close backends: %v", err)
+ }
}