From 4cb67f0a1758f96ce85f6258c6663fd57460f005 Mon Sep 17 00:00:00 2001 From: shinya Date: Fri, 22 Aug 2025 07:53:17 +0200 Subject: [PATCH] Rename example directory --- _examples/colors.go | 50 ++++++++++++++++++++++ {examples => _examples}/config.json | 0 {examples => _examples}/configuration.go | 0 {examples => _examples}/getTerminalSize.go | 0 4 files changed, 50 insertions(+) create mode 100644 _examples/colors.go rename {examples => _examples}/config.json (100%) rename {examples => _examples}/configuration.go (100%) rename {examples => _examples}/getTerminalSize.go (100%) diff --git a/_examples/colors.go b/_examples/colors.go new file mode 100644 index 0000000..953f315 --- /dev/null +++ b/_examples/colors.go @@ -0,0 +1,50 @@ +package main + +import ( + "fmt" + "whspbrd/internal/tui" +) + +func main() { + // Define a color palette + palette := tui.Palette{ + Base00: tui.NewColor(31), + Base01: tui.NewColor(32), + Base02: tui.NewColor(33), + Base03: tui.NewColor(34), + Base04: tui.NewColor(35), + Base05: tui.NewColor(36), + Base06: tui.NewColor(41), + Base07: tui.NewColor(42), + Base08: tui.NewColor(43), + Base09: tui.NewColor(44), + Base10: tui.NewColor(45), + Base11: tui.NewColor(46), + Base12: tui.NewColor(47), + Base13: tui.NewColor(11), + Base14: tui.NewColor(12), + Base15: tui.NewColor(13), + Reset: "\033[0m", + } + + // loop through the palette and print each color + + fmt.Print("Color Palette:\n") + fmt.Println(palette.Base00, "Base00:") + fmt.Println(palette.Base01, "Base01:") + fmt.Println(palette.Base02, "Base02:") + fmt.Println(palette.Base03, "Base03:") + fmt.Println(palette.Base04, "Base04:") + fmt.Println(palette.Base05, "Base05:", palette.Reset) + fmt.Println(palette.Base06, "Base06:") + fmt.Println(palette.Base07, "Base07:") + fmt.Println(palette.Base08, "Base08:") + fmt.Println(palette.Base09, "Base09:") + fmt.Println(palette.Base10, "Base10:") + fmt.Println(palette.Base11, "Base11:") + fmt.Println(palette.Base12, "Base12:", palette.Reset) + fmt.Println(palette.Base13, "Base13:") + fmt.Println(palette.Base14, "Base14:") + fmt.Println(palette.Base15, "Base15:") + +} diff --git a/examples/config.json b/_examples/config.json similarity index 100% rename from examples/config.json rename to _examples/config.json diff --git a/examples/configuration.go b/_examples/configuration.go similarity index 100% rename from examples/configuration.go rename to _examples/configuration.go diff --git a/examples/getTerminalSize.go b/_examples/getTerminalSize.go similarity index 100% rename from examples/getTerminalSize.go rename to _examples/getTerminalSize.go