makenowjust/heredoc

GitHub: makenowjust/heredoc

一个 Go 语言库,提供保留缩进的多行 here-document 功能,自动去除公共前导空白以输出整洁的多行文本。

Stars: 180 | Forks: 8

# heredoc [![Version](https://img.shields.io/github/v/release/makenowjust/heredoc)](https://github.com/makenowjust/heredoc/releases) [![Workflow Result](https://static.pigsec.cn/wp-content/uploads/repos/cas/45/45c1010596e099d79c3d0cf019e3eeb50095fdc69b60dc47e92aa24a477d189a.svg)](https://github.com/makenowjust/heredoc/actions/workflows/main.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/makenowjust/heredoc/v2.svg)](https://pkg.go.dev/github.com/MakeNowJust/heredoc/v2) ## 关于 heredoc 包提供了保留缩进的 here-document。 ## 导入 ``` import "github.com/MakeNowJust/heredoc/v2" ``` ## 示例 ``` package main import ( "fmt" "github.com/MakeNowJust/heredoc/v2" ) func main() { fmt.Println(heredoc.Doc(` Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ... `)) // Output: // Lorem ipsum dolor sit amet, consectetur adipisicing elit, // sed do eiusmod tempor incididunt ut labore et dolore magna // aliqua. Ut enim ad minim veniam, ... // } ``` ## API 文档 [heredoc 包 - github.com/MakeNowJust/heredoc/v2 - pkg.go.dev](https://pkg.go.dev/github.com/MakeNowJust/heredoc/v2) ## 许可证 本软件基于 MIT License 发布,请参阅 LICENSE。
标签:EVTX分析, 日志审计