style.go 205 B

12345678910111213
  1. package style
  2. import (
  3. "fmt"
  4. )
  5. func Display(text string, code int) string {
  6. return fmt.Sprintf("\x1b[%dm%s\x1b[0m", code, text)
  7. }
  8. func Bold(text string) string {
  9. return Display(text, 1)
  10. }