This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bufio" | |
"errors" | |
"strings" | |
"time" | |
) | |
// Readln reads and returns a single line (sentinal: \n) from stdin. | |
// If a given timeout has passed, an error is returned. | |
// This functionality is similar to GNU's `read -e -p [s] -t [num] [name]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"fmt" | |
"log" |