Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 23 – Tratamento de Erros – 3. Print & Log
Play lesson

Aprenda Go 🇧🇷 - Cap. 23 – Tratamento de Erros – 3. Print & Log

5.0 (2)
47 learners

What you'll learn

This course includes

  • 21.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

- Opções: - fmt.Println() → stdout - log.Println() → timestamp + pode-se determinar onde o erro ficará logado - log.Fatalln() → os.Exit(1) sem defer - log.Panicln() → println + panic → funcões em defer rodam; dá pra usar recover - panic() - Recomendação: use log. - Código: - 1. fmt.Println - 2. log.Println - 3. log.SetOutput - 4. log.Fatalln - 5. log.Panicln - 6. panic - panic: http://godoc.org/builtin#panic - Código: https://github.com/ellenkorbes/aprendago/tree/master/c%C3%B3digo/23_tratamento-de-erros/03_print-e-log

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere