~whynothugo/autovdirsyncer

0260ffbf21fff11b5927339c357e425c92e0ff9a — Hugo Osvaldo Barrera 3 years ago 675cd32
Fix linting issues spotted by staticcheck
1 files changed, 2 insertions(+), 3 deletions(-)

M config.go
M config.go => config.go +2 -3
@@ 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
}