Search⌘ K

Challenge: Writing to a WIKI Page

Explore how to write a save method on a Go struct to save text files and create a load function to read those files. Understand how to efficiently handle file operations using pointers and ioutil functions in Go, preparing you to manage data persistence in your applications.

We'll cover the following...

Problem statement

The data structure of our program is a struct containing the following fields:

type Page struct {
  Title string
  Body []byte
}
...