/go-slugify

Pretty Slug.

Primary LanguageGoMIT LicenseMIT

go-slugify

Build Status Go Report Card GoDoc

URL Slug.

Installation

go get -u github.com/shopsmart/go-slugify

Install CLI tool:

go get -u github.com/shopsmart/go-slugify/slugify
$ slugify "Brad's Deals & abc"
brads-deals-abc

Documentation

API documentation can be found here: https://godoc.org/github.com/shopsmart/go-slugify

Usage

package main

import (
  "fmt"
  "github.com/shopsmart/go-slugify"
)

func main() {
  s := "Brad's Deals & abc"
  fmt.Println(slugify.Slugify(s))
  // Output: brads-deals-abc
}