Before you create TCP/IP servers with Go, this chapter will teach you how to work with the HTTPS protocol in Go, which is the secure version of the HTTP protocol. Notice that the default TCP port for HTTPS is 443, but you can use any port number you want as long as you put it in the URL.
Working with HTTPS traffic
Creating certificates
In order to be able to follow and execute the code examples of this section, you will first need to create certificates because HTTPS requires them. On a macOS Mojave machine, you will need to execute the following commands:
$ openssl genrsa -out server.key 2048 Generating RSA private key, 2048 bit long modulus .....................+++ .......................+++ e is 65537 (0x10001) $ openssl...