2 of 13 pages

go

Create a Boolean Yes or No prompt in Go

Article preview image Article preview image

In this post, I will create a simple function that will allow you to ask the user a question, receive a valid response, and return it as a Boolean type. And if needed, the user will be able to tap Ctrl+C at any time to exit the program. Also importantly, despite using the operating system input, we will create unit tests for os.stdin.

Continue reading



go

Center text in a terminal with Go

Article preview image Article preview image

This guide will show how simple it is to center text in a terminal or a text file using the Go standard and external libraries. We will create two functions, NCenter, which provides for a width parameter, and a Center func that will determine the center placement based on the width of the terminal screen.

You can find the final code on GitHub or play with NCenter() in the Go Playground.

Continue reading


mysql wordpress

Customise WordPress on Docker

In this guide, let’s go through the process of installing and configuring WordPress on a Docker container using docker-compose. The primary goals are to install a bare-bones install with the ability to customise wp-config.php, php.ini and my.cnf. There is an expectation that you are familiar with Docker, WordPress, PHP and MySQL configuration files.

Continue reading

2 of 13 pages