commit | 7bfe4c7ecddb3666a94b053b422cdd8f5aaa3615 | [log] [tgz] |
---|---|---|
author | Sam Whited <sam@samwhited.com> | Wed Dec 26 21:49:07 2018 |
committer | Dmitri Shuralyov <dmitri@shuralyov.com> | Wed Dec 26 21:49:07 2018 |
tree | f9cdfdcaa73bf7f42c3d0336fdffa195641cd2cf | |
parent | 86672fcb3f950f35f2e675df2240550f2a50762f [diff] |
Add go.mod file. (#6) Add a minimal go.mod file in order to create a v1.0.0 module release.
Package sanitized_anchor_name provides a func to create sanitized anchor names.
Its logic can be reused by multiple packages to create interoperable anchor names and links to those anchors.
At this time, it does not try to ensure that generated anchor names are unique, that responsibility falls on the caller.
go get -u github.com/shurcooL/sanitized_anchor_name
anchorName := sanitized_anchor_name.Create("This is a header") fmt.Println(anchorName) // Output: // this-is-a-header