feat: add linters #11
1 changed files with 7 additions and 1 deletions
8
main.go
8
main.go
|
@ -26,7 +26,13 @@ func main() {
|
|||
fmt.Printf("Error opening %s: %v\n", eventPath, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer eventFile.Close()
|
||||
defer func() {
|
||||
closeFileErr := eventFile.Close()
|
||||
if closeFileErr != nil {
|
||||
fmt.Println("Error closing eventFile")
|
||||
os.Exit(1)
|
||||
}
|
||||
}()
|
||||
|
||||
var event GithubEvent
|
||||
decoder := json.NewDecoder(eventFile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue