forked from pterm/pterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
17 lines (14 loc) · 864 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main
import "github.com/pterm/pterm"
func main() {
// Enable debug messages.
pterm.EnableDebugMessages()
pterm.Debug.Println("Hello, World!") // Print Debug.
pterm.Info.Println("Hello, World!") // Print Info.
pterm.Success.Println("Hello, World!") // Print Success.
pterm.Warning.Println("Hello, World!") // Print Warning.
pterm.Error.Println("Errors show the filename and linenumber inside the terminal!") // Print Error.
pterm.Info.WithShowLineNumber().Println("Other PrefixPrinters can do that too!") // Print Error.
// Temporarily set Fatal to false, so that the CI won't crash.
pterm.Fatal.WithFatal(false).Println("Hello, World!") // Print Fatal.
}