5910 Breckenridge Pkwy Suite B, Tampa, FL. 33610
(800) 272-0707

SkillSoft Explore Course

Aspire     Go Programming Essentials     Go Programming Essentials Track : 01 Go Foundation for Beginners
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.

Objectives

Getting Started with Go: Error & File Handling

  • 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