To find where your $GOPATH directory is located, run the following command:

go env GOPATH
The output you receive will vary, but the default is the go directory inside of your $HOME directory:

Output$HOME/go
With the binary installed, test to see if the program will run from outside its source directory. Move back to your home directory:

cd $HOME
With the $GOPATH/bin directory set up, move back to your greeter directory:

cd ..
This will build your binary and place it in $GOPATH/bin. To test this, run the following:

ls $GOPATH/bin
This will list the contents of $GOPATH/bin:

Outputgreeter
The results are all optional components that you can install. It will give you a short description for each:

bandwidthd-pgsql/bionic 2.0.1+cvs20090917-10ubuntu1 amd64
  Tracks usage of TCP/IP and builds html files with graphs

bluefish/bionic 2.2.10-1 amd64
  advanced Gtk+ text editor for web and software development

cacti/bionic 1.1.38+ds1-1 all
  web interface for graphing of monitoring systems

ganglia-webfrontend/bionic 3.6.1-3 all
  cluster monitoring toolkit - web front-end

golang-github-unknwon-cae-dev/bionic 0.0~git20160715.0.c6aac99-4 all
  PHP-like Compression and Archive Extensions in Go

haserl/bionic 0.9.35-2 amd64
  CGI scripting program for embedded environments

kdevelop-php-docs/bionic 5.2.1-1ubuntu2 all
  transitional package for kdevelop-php

kdevelop-php-docs-l10n/bionic 5.2.1-1ubuntu2 all
  transitional package for kdevelop-php-l10n
…
:

Recommend

How To Build and Install Go Programs Step 5 — Installing Go Programs with go install

How To Build and Install Go Programs Step 4 — Changing the Binary Name

How To Build and Install Go Programs Step 3 — Building Go Binaries With go build

How To Build and Install Go Programs Step 2 — Creating a Go Module to Build a Go Binary

How To Build and Install Go Programs Step 1 — Setting Up and Running the Go Binary

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Step 5 — Verifying Certbot Auto-Renewal

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Step 4 — Obtaining an SSL Certificate

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Step 3 — Allowing HTTPS Through the Firewall

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Step 2 — Confirming Nginx’s Configuration

How To Set Up Let's Encrypt with Nginx Server Blocks on Ubuntu 16.04 Step 1 — Installing Certbot

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 8 — Suppression d’une tâche

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 7 — Affichage des tâches terminées

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 6 — Affichage des tâches en attente uniquement

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 5 — Fin d’une tâche

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 4 — Liste de toutes les tâches

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 3 — Création d’une tâche

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 2 — Création d’un programme CLI

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Étape 1 — Installation du pilote Go de MongoDB

Comment utiliser Go avec MongoDB en utilisant le pilote MongoDB Go Conditions préalables

Como instalar o Linux, o Nginx, o MySQL e a pilha PHP (LEMP) no CentOS 8 [Início rápido] Passo 4 — Testar o PHP com o Nginx

Como instalar o Linux, o Nginx, o MySQL e a pilha PHP (LEMP) no CentOS 8 [Início rápido] Passo 3 — Instalar o PHP-FPM