Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 16 – Aplicações – 4. A interface Writer
Play lesson

Aprenda Go 🇧🇷 - Cap. 16 – Aplicações – 4. A interface Writer

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

- A interface writer do pacote io. - type Writer interface { Write(p []byte) (n int, err error) } - pkg os: func (f *File) Write(b []byte) (n int, err error) - pkg json: func NewEncoder(w io.Writer) *Encoder - "Println [...] writes to standard output." - func Println [...] return Fprintln(os.Stdout, a...) - func Fprintln(w io.Writer, a ...interface{}) (n int, err error) - Stdout: NewFile(uintptr(syscall.Stdout), "/dev/stdout") (Google: Standard streams) - func NewFile(fd uintptr, name string) *File - func (f *File) Write(b []byte) (n int, err error) - Exemplo: - Println - Fprintln os.Stdout - io.WriteString os.Stdout - Ou: - func Dial(network, address string) (Conn, error) - type Conn interface { [...] Write(b []byte) (n int, err error) [...] }

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