Home / Go

Go

How To Deploy and Manage Your DNS Using DNSControl on Debian 10

The author selected the Electronic Frontier Foundation Inc to receive a donation as part of the Write for DOnations program. Introduction DNSControl is an infrastructure-as-code tool that allows you to deploy and manage your DNS zones using standard software development principles, including version control, testing, and automated deployment. DNSControl was …

Read More »

Defining Methods in Go

Introduction Functions allow you to organize logic into repeatable procedures that can use different arguments each time they run. In the course of defining functions, you’ll often find that multiple functions might operate on the same piece of data each time. Go recognizes this pattern and allows you to define …

Read More »

How To Use Interfaces in Go

Introduction Writing flexible, reusable, and modular code is vital for developing versatile programs. Working in this way ensures code is easier to maintain by avoiding the need to make the same change in multiple places. How you accomplish this varies from language to language. For instance, inheritance is a common …

Read More »

How To Build and Install Go Programs

Introduction So far in our How To Code in Go series, you have used the command go run to automatically compile your source code and run the resulting executable. Although this command is useful for testing your code on the command line, distributing or deploying your application requires you to …

Read More »

How To Use the Flag Package in Go

Introduction Command-line utilities are rarely useful out of the box without additional configuration. Good defaults are important, but useful utilities need to accept configuration from users. On most platforms, command-line utilities accept flags to customize the command’s execution. Flags are key-value delimited strings added after the name of the command. …

Read More »

How To Use Struct Tags in Go

Introduction Structures, or structs, are used to collect multiple pieces of information together in one unit. These collections of information are used to describe higher-level concepts, such as an Address composed of a Street, City, State, and PostalCode. When you read this information from systems such as databases, or APIs, …

Read More »