Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 6 days 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 (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-03-04T01:00:08.000Z (11 months ago)
- Last Synced: 2025-01-04T20:06:39.760Z (14 days ago)
- Topics: go, golang, heredoc, indent, library, text
- Language: Go
- Homepage: https://pkg.go.dev/github.com/MakeNowJust/heredoc/v2
- Size: 37.1 KB
- Stars: 160
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heredoc
[![Version](https://img.shields.io/github/v/release/makenowjust/heredoc)](https://github.com/makenowjust/heredoc/releases)
[![Workflow Result](https://github.com/makenowjust/heredoc/actions/workflows/main.yml/badge.svg?branch=main)](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)## About
Package heredoc provides the here-document with keeping indent.
## Import
```go
import "github.com/MakeNowJust/heredoc/v2"
```## Example
```go
package mainimport (
"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.