mirror of https://github.com/knative/client.git
* Updates spf13/cobra dep to v0.0.5 Fixes #426 - and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899 - also updates viper to 1.4.0 * Updates to go.sum * Updates go.mod as a result of `go install golang.org/x/tools/cmd/goimports` |
||
|---|---|---|
| .. | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| go.mod | ||
| main.go | ||
README.md
sanitized_anchor_name
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.
Installation
go get -u github.com/shurcooL/sanitized_anchor_name
Example
anchorName := sanitized_anchor_name.Create("This is a header")
fmt.Println(anchorName)
// Output:
// this-is-a-header