diff options
Diffstat (limited to 'forged/internal/ansiec')
-rw-r--r-- | forged/internal/ansiec/ansiec.go | 5 | ||||
-rw-r--r-- | forged/internal/ansiec/colors.go | 26 | ||||
-rw-r--r-- | forged/internal/ansiec/reset.go | 6 | ||||
-rw-r--r-- | forged/internal/ansiec/style.go | 11 |
4 files changed, 48 insertions, 0 deletions
diff --git a/forged/internal/ansiec/ansiec.go b/forged/internal/ansiec/ansiec.go new file mode 100644 index 0000000..542c564 --- /dev/null +++ b/forged/internal/ansiec/ansiec.go @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> + +// Package ansiec provides definitions for ANSI escape sequences. +package ansiec diff --git a/forged/internal/ansiec/colors.go b/forged/internal/ansiec/colors.go new file mode 100644 index 0000000..8e5f54b --- /dev/null +++ b/forged/internal/ansiec/colors.go @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> + +package ansiec + +const ( + Black = "\x1b[30m" + Red = "\x1b[31m" + Green = "\x1b[32m" + Yellow = "\x1b[33m" + Blue = "\x1b[34m" + Magenta = "\x1b[35m" + Cyan = "\x1b[36m" + White = "\x1b[37m" +) + +const ( + BrightBlack = "\x1b[30;1m" + BrightRed = "\x1b[31;1m" + BrightGreen = "\x1b[32;1m" + BrightYellow = "\x1b[33;1m" + BrightBlue = "\x1b[34;1m" + BrightMagenta = "\x1b[35;1m" + BrightCyan = "\x1b[36;1m" + BrightWhite = "\x1b[37;1m" +) diff --git a/forged/internal/ansiec/reset.go b/forged/internal/ansiec/reset.go new file mode 100644 index 0000000..c5b6ba6 --- /dev/null +++ b/forged/internal/ansiec/reset.go @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> + +package ansiec + +const Reset = "\x1b[0m" diff --git a/forged/internal/ansiec/style.go b/forged/internal/ansiec/style.go new file mode 100644 index 0000000..dd37344 --- /dev/null +++ b/forged/internal/ansiec/style.go @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> + +package ansiec + +const ( + Bold = "\x1b[1m" + Underline = "\x1b[4m" + Reversed = "\x1b[7m" + Italic = "\x1b[3m" +) |