如何在Go(Golang)中以黑体字打印/输出文本

116 阅读1分钟

概述

我们可以使用信仰包来实现同样的目的

github.com/fatih/color

程序

package main

import "github.com/fatih/color"

func main() {
    whilte := color.New(color.FgWhite)
    boldWhite := whilte.Add(color.Bold)
    boldWhite.Println("This will print text in bold white.")
}

输出