Skip to content

Commit

Permalink
Fix gometalinter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaakko Pallari authored and Jaakko Pallari committed Aug 1, 2017
1 parent 7c95df9 commit 22c357e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ type Group struct {
Groups map[string]*Group `json:"groups"`
Checks map[string]*Check `json:"checks"`

groupMutex sync.Mutex `json:"-"`
checkMutex sync.Mutex `json:"-"`
groupMutex sync.Mutex `json:"-"`
checkMutex sync.Mutex `json:"-"`
}

func NewGroup(name string, parent *Group) (*Group, error) {
Expand Down
4 changes: 3 additions & 1 deletion run.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ func writeFile(fs afero.Fs, filename string, contents []byte) (err error) {
return
}

defer file.Close()
defer func() {
_ = file.Close()
}()

_, err = file.Write(contents)

Expand Down

0 comments on commit 22c357e

Please sign in to comment.