makenowjust/heredoc
GitHub: makenowjust/heredoc
一个 Go 语言库,提供保留缩进的多行 here-document 功能,自动去除公共前导空白以输出整洁的多行文本。
Stars: 180 | Forks: 8
# heredoc
[](https://github.com/makenowjust/heredoc/releases)
[](https://github.com/makenowjust/heredoc/actions/workflows/main.yml)
[](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分析, 日志审计