func (g GistService) FileURL(fileName string) string {
	var url string
	for _, f := range g.files {
		if fileName == f[0] {
			url = f[1]
		}
	}
	return url
}
returns URL if file exists, empty string if not
package main
import (
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net"
	"net/http"
	"net/url"
	"os"
	"strings"
	"text/tabwriter"
	"time"
	"github.com/ahmetb/go-cursor"
	"github.com/charmbracelet/glamour"
	"golang.org/x/crypto/ssh"
	terminal "golang.org/x/term"
)
const globalTerminalWidth = 72
func typewrite(w io.Writer, speed time.Duration, content string) {
	chars := strings.Split(content, "")
	for _, c := range chars {
		fmt.Fprint(w, c)
		time.Sleep(speed)
	}
}
func typewriteLines(w io.Writer, speed time.Duration, lines []string) {
	for _, line := range lines {
		typewrite(w, speed, line)
	}
}
type gistCache struct {
	Expiration time.Time
	Content    string
	Rendered   string
}
type GistService struct {
	files       [][]string
	cachedGists map[string]gistCache
}
func NewGistService(files [][]string) GistService {
	return GistService{
		files:       files,
		cachedGists: map[string]gistCache{},
	}
}
func (g GistService) FileNames() []string {
	fileNames := make([]string, g.Count())
	for i, f := range g.files {
		fileNames[i] = f[0]
	}
	return fileNames
}
func (g GistService) Count() int {
	return len(g.files)
}