shopsmart / go-slugify

Pretty Slug.

Home Page:https://godoc.org/github.com/mozillazg/go-slugify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
}

About

Pretty Slug.

https://godoc.org/github.com/mozillazg/go-slugify

License:MIT License


Languages

Language:Go 95.5%Language:Makefile 4.5%