Skip to content

Commit

Permalink
added 'defer keyFile.Close()' after read ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
eikoshelev committed Nov 22, 2019
1 parent af129c5 commit c2de803
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func (g *git) gitAuth() {
if err != nil {
log.Fatalf("[Auth] Failed open SSH key file: %s\n", err.Error())
}

defer keyFile.Close()

key, err := ioutil.ReadAll(keyFile)
if err != nil {
Expand Down

0 comments on commit c2de803

Please sign in to comment.