diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:36:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:36:04 +0000 |
commit | b09c6d56832eb1718c07d74abf3bc6ae3fe4e030 (patch) | |
tree | d2caec2610d4ea887803ec9e9c3cd77136c448ba /dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md | |
parent | Initial commit. (diff) | |
download | icingadb-upstream.tar.xz icingadb-upstream.zip |
Adding upstream version 1.1.0.upstream/1.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md')
-rw-r--r-- | dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md new file mode 100644 index 0000000..8bdb1f5 --- /dev/null +++ b/dependencies/pkg/mod/github.com/acarl005/stripansi@v0.0.0-20180116102854-5a71ef0e047d/README.md @@ -0,0 +1,30 @@ +Strip ANSI +========== + +This Go package removes ANSI escape codes from strings. + +Ideally, we would prevent these from appearing in any text we want to process. +However, sometimes this can't be helped, and we need to be able to deal with that noise. +This will use a regexp to remove those unwanted escape codes. + + +## Install + +```sh +$ go get -u github.com/acarl005/stripansi +``` + +## Usage + +```go +import ( + "fmt" + "github.com/acarl005/stripansi" +) + +func main() { + msg := "\x1b[38;5;140m foo\x1b[0m bar" + cleanMsg := stripansi.Strip(msg) + fmt.Println(cleanMsg) // " foo bar" +} +``` |