diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-04-02 10:39:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-02 10:39:47 +0200 |
commit | 0c2618bc7d495322c6413b0ff62549712747cf9e (patch) | |
tree | 03ddc67b73733d0582367e9038c454353fa55955 /storage/filesystem/config.go | |
parent | 160e6d5b654fbbaf0d9264f226c56a03f0e27d30 (diff) | |
parent | 6e07548d9078505ca2945f09d11729b14abcc907 (diff) | |
download | go-git-0c2618bc7d495322c6413b0ff62549712747cf9e.tar.gz |
Merge pull request #794 from jfontan/fix/checkclose
Use CheckClose with named returns and fix tests
Diffstat (limited to 'storage/filesystem/config.go')
-rw-r--r-- | storage/filesystem/config.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/filesystem/config.go b/storage/filesystem/config.go index a2cc173..85feaf0 100644 --- a/storage/filesystem/config.go +++ b/storage/filesystem/config.go @@ -13,7 +13,7 @@ type ConfigStorage struct { dir *dotgit.DotGit } -func (c *ConfigStorage) Config() (*config.Config, error) { +func (c *ConfigStorage) Config() (conf *config.Config, err error) { cfg := config.NewConfig() f, err := c.dir.Config() @@ -32,15 +32,15 @@ func (c *ConfigStorage) Config() (*config.Config, error) { return nil, err } - if err := cfg.Unmarshal(b); err != nil { + if err = cfg.Unmarshal(b); err != nil { return nil, err } return cfg, err } -func (c *ConfigStorage) SetConfig(cfg *config.Config) error { - if err := cfg.Validate(); err != nil { +func (c *ConfigStorage) SetConfig(cfg *config.Config) (err error) { + if err = cfg.Validate(); err != nil { return err } |