Add the following code after your init function to create your CLI program and cause your code to compile:

. . .
func main() {
	app := &cli.App{
		Name:     "tasker",
		Usage:    "A simple CLI program to manage your tasks",
		Commands: []*cli.Command{},
	}

	err := app.Run(os.Args)
	if err != nil {
		log.Fatal(err)
	}
}
Here’s the command you need to build and run the program:

go run main.go

# Output:
# OutputNAME:
#    tasker - A simple CLI program to manage your tasks
# 
# USAGE:
#    main [global options] command [command options] [arguments...]
# 
# COMMANDS:
#    help, h  Shows a list of commands or help for one command
# 
# GLOBAL OPTIONS:
#    --help, -h     show help (default: false)
Add the following highlighted code to your main.go file:

package main

import (
	"context"
	"log"
	"os"

	"github.com/urfave/cli/v2"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)
. . .
Run the following command to add the package as a dependency:

go get github.com/urfave/cli/v2

Recommend

How To Use Go with MongoDB Using the MongoDB Go Driver Step 2 — Creating a CLI Program

How To Use Go with MongoDB Using the MongoDB Go Driver Step 1 — Installing the MongoDB Go Driver

How To Use Go with MongoDB Using the MongoDB Go Driver Prerequisites

Installing Django on Ubuntu 12.04 Installing Django Installing Django from the Git Repository

Installing Django on Ubuntu 12.04 Installing Django Installing Django without Aptitude:

Installing Django on Ubuntu 12.04 Installing Django Installing Django with Aptitude:

Installing Django on Ubuntu 12.04 Optional installations

Installing Django on Ubuntu 12.04 Prerequisites

Cómo crear e instalar programas de Go Instalar programas Go con go install

Cómo crear e instalar programas de Go Cambiar el nombre del binario

Cómo crear e instalar programas de Go Compilar binarios de Go con go build

Cómo crear e instalar programas de Go Configurar y ejecutar el binario de Go

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 4: Inhabilitar la autenticación con contraseña en su servidor

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 3: Autenticación en el servidor de Ubuntu con claves de SSH

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 2: Copiar la clave pública al servidor Ubuntu Copiar la clave pública de forma manual

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 2: Copiar la clave pública al servidor Ubuntu Copiar clave pública usando SSH

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 2: Copiar la clave pública al servidor Ubuntu Copiar clave pública usando ssh-copy-id

Cómo configurar claves de SSH en Ubuntu 20.04 Paso 1: Crear el par de claves

How To Install WordPress on Ubuntu 12.04 Step Four—Copy the Files

How To Install WordPress on Ubuntu 12.04 Step Three—Setup the WordPress Configuration

How To Install WordPress on Ubuntu 12.04 Step Two—Create the WordPress Database and User

How To Install WordPress on Ubuntu 12.04 Step One—Download WordPress

How To Create React Elements with JSX Step 5 — Conditionally Showing Elements with Short Circuiting

How To Create React Elements with JSX Step 4 — Mapping Over Data to Create Elements

How To Create React Elements with JSX Step 2 — Adding Styling to an Element with Attributes