diff --git a/go.mod b/go.mod index feaaeb9..ba41592 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/hahwul/gee go 1.15 + +require github.com/logrusorgru/aurora v2.0.3+incompatible diff --git a/main.go b/main.go index 8a2d028..e750517 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( app "github.com/hahwul/gee/pkg/gee" model "github.com/hahwul/gee/pkg/model" printing "github.com/hahwul/gee/pkg/printing" + "github.com/logrusorgru/aurora" ) func main() { @@ -28,9 +29,9 @@ func main() { // Custom usage flag.Usage = func() { printing.Banner() - fmt.Fprintf(os.Stderr, "Usage: %s [flags] [file1] [file2] ...\n", os.Args[0]) + fmt.Fprintf(os.Stderr, aurora.White("Usage: %s [flags] [file1] [file2] ...\n").String(), os.Args[0]) fmt.Fprintf(os.Stderr, "(If you do not specify a file, only stdout is output)\n\n") - fmt.Fprintf(os.Stderr, "Flags\n") + fmt.Fprintf(os.Stderr, aurora.White("Flags:\n").String()) flag.PrintDefaults() } diff --git a/pkg/printing/banner.go b/pkg/printing/banner.go index f95ad13..da215aa 100644 --- a/pkg/printing/banner.go +++ b/pkg/printing/banner.go @@ -3,16 +3,18 @@ package printing import ( "fmt" "os" + + "github.com/logrusorgru/aurora" ) // Banner is banner of gee func Banner() { - fmt.Fprintln(os.Stderr, "._____ ._______._______") - fmt.Fprintln(os.Stderr, ":_ ___\\ : .____/: .____/") - fmt.Fprintln(os.Stderr, "| |___| : _/\\ | : _/\\ ") - fmt.Fprintln(os.Stderr, "| / || / \\| / \\") + fmt.Fprintln(os.Stderr, aurora.White("._____ ._______._______").String()) + fmt.Fprintln(os.Stderr, aurora.White(":_ ___\\ : .____/: .____/").String()) + fmt.Fprintln(os.Stderr, aurora.White("| |___| : _/\\ | : _/\\ ").String()) + fmt.Fprintln(os.Stderr, aurora.White("| / || / \\| / \\").String()) fmt.Fprintln(os.Stderr, "|. __ ||_.: __/|_.: __/") fmt.Fprintln(os.Stderr, ":/ |. | :/ :/") - fmt.Fprintln(os.Stderr, ": : / "+VERSION) + fmt.Fprintln(os.Stderr, ": : / "+aurora.BrightYellow("{"+VERSION+"}").String()) fmt.Fprintln(os.Stderr, " : ") }