Getting Started with Go: Error & File Handling

Go 1.16
  • 12 Videos | 1h 35m 19s
  • Includes Assessment
  • Earns a Badge
Go has a unique approach to error handling, treating errors as values that can be passed around and manipulated just like any other values. The language also provides several packages and built-ins in the standard library for working with file systems and performing I/O operations. In this course, you'll explore how errors are handled in Go using error values. You'll learn how to handle errors by importing and using package errors and work with custom error types. You'll examine how to implement Go's defer statement along with the built-in panic and recover functions to handle and recover from real-time errors. Finally, you'll learn about file input and output and how to perform basic I/O operations on files and directories.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    recognize error types and why error handling is such an important consideration
    describe how error handling is implemented in Go
    use function return values to handle error conditions
    recognize how to use package errors for managing errors
    create and use custom error types
  • use the defer statement, along with panic and recover built-in functions to manage exceptions
    perform basic file operations in Go including create, open, close, delete, truncate, rename, move, copy, and get file info
    read an entire file into memory using package os
    read a file line by line in Go using package bufio
    perform directory input/output operations in Go
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 41s
    UP NEXT
  • Playable
    2. 
    Rationale for Error Handling in Go
    7m 7s
  • Locked
    3. 
    Error Handling in Go
    7m 20s
  • Locked
    4. 
    Handling Errors in Go Programs
    6m 5s
  • Locked
    5. 
    Working with Package errors in Go
    10m 6s
  • Locked
    6. 
    Working with Custom Error Types in Go
    8m 16s
  • Locked
    7. 
    Using Defer, Panic, and Recover to Manage Exceptions
    7m 17s
  • Locked
    8. 
    Performing Basic File Operations in Go
    14m 54s
  • Locked
    9. 
    Reading Files into Memory in Go
    6m 17s
  • Locked
    10. 
    Reading Files Line by Line in Go
    7m 52s
  • Locked
    11. 
    Performing Directory I/O Operations in Go
    12m 28s
  • Locked
    12. 
    Course Summary
    57s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE