Projects STRLCPY wholeaked Commits b1411b16
🤬
  • Refactor the possible resource leak, 'defer' is called in the 'for' loop

  • Loading...
  • Sevban Bayrak committed 2 years ago
    b1411b16
    1 parent 9c8ac23c
  • ■ ■ ■ ■
    main.go
    skipped 697 lines
    698 698   fmt.Println(err)
    699 699   os.Exit(1)
    700 700   }
    701  - defer f.Close()
    702 701   contentType := GetFileContentType(f)
     702 + f.Close()
    703 703   attachmentFile := mail.NewAttachment()
    704 704   dat, err := ioutil.ReadFile(attachment)
    705 705   if err != nil {
    skipped 156 lines
Please wait...
Page is in error, reload to recover