...

/

Developing a Basic Phone Book Application

Developing a Basic Phone Book Application

Let’s learn how to create a command-line phone book app using hardcoded data for users to search and list records by surname.

Introduction

In this lesson, to utilize the skills we’ve picked up so far, we will develop a basic phone book application in Go. Despite its limitations, the presented application is a command-line utility that searches a slice of structures that is statically defined (hardcoded) in the Go code. The utility offers support for two commands named search and list that search for a given surname and return its full record if the surname is found and lists all available records, respectively.

Shortcomings

The implementation has many shortcomings, including the following:

  • If we want to add or delete any data, we ...