https://github.com/makenowjust/heredoc
Package heredoc provides the here-document with keeping indent.
https://github.com/makenowjust/heredoc
go golang heredoc indent library text
Last synced: about 1 year ago
JSON representation
Package heredoc provides the here-document with keeping indent.
- Host: GitHub
- URL: https://github.com/makenowjust/heredoc
- Owner: makenowjust
- License: mit
- Created: 2014-07-04T13:45:16.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2025-01-05T14:16:42.000Z (over 1 year ago)
- Last Synced: 2025-04-13T16:50:20.889Z (about 1 year ago)
- Topics: go, golang, heredoc, indent, library, text
- Language: Go
- Homepage: https://pkg.go.dev/github.com/MakeNowJust/heredoc/v2
- Size: 39.1 KB
- Stars: 167
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)
## About
Package heredoc provides the here-document with keeping indent.
## Import
```go
import "github.com/MakeNowJust/heredoc/v2"
```
## Example
```go
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 Document
[heredoc package - github.com/MakeNowJust/heredoc/v2 - pkg.go.dev](https://pkg.go.dev/github.com/MakeNowJust/heredoc/v2)
## License
This software is released under the MIT License, see LICENSE.