@@ 2,7 2,6 @@ package main
import (
"encoding/json"
- "errors"
"fmt"
"os/exec"
)
@@ 21,14 20,14 @@ type Storage struct {
func GetVdirsyncerConfig() (*Config, error) {
out, err := exec.Command("vdirsyncer", "showconfig").Output()
if err != nil {
- return nil, errors.New(fmt.Sprintf("Failed to get vdirsyncer config: %v", err))
+ return nil, fmt.Errorf("failed to get vdirsyncer config: %v", err)
}
config := &Config{}
err = json.Unmarshal(out, config)
if err != nil {
- return nil, errors.New(fmt.Sprintf("Failed to parse vdirsyncer config: %v", err))
+ return nil, fmt.Errorf("failed to parse vdirsyncer config: %v", err)
}
return config, err
}