9ssi7 / slug

Slug is a simple, lightweight, and fast slug generator for Go.

Home Page:https://pkg.go.dev/github.com/9ssi7/slug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slug

Go Reference Go Report Card Apache License

Slug is a simple, lightweight, and fast slug generator for Go.

Installation

go get github.com/9ssi7/slug

Usage

packslug main

import (
    "fmt"

    "github.com/9ssi7/slug"
)

func main() {
    fmt.Println(slug.New("Hello World!"))
    // Output: hello-world

    // check if a string is a valid slug
    res := slug.Is("hello-world") // true
}

Documentation

Documentation is available at pkg.go.dev.

Contributing

Contributions are always welcome!

License

MIT

About

Slug is a simple, lightweight, and fast slug generator for Go.

https://pkg.go.dev/github.com/9ssi7/slug

License:Apache License 2.0


Languages

Language:Go 100.0%