/go-slugify

Pretty Slug.

Primary LanguageGoMIT LicenseMIT

go-slugify

Build Status Coverage Status Go Report Card GoDoc

Make Pretty Slug.

Installation

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

Install CLI tool:

go get -u github.com/mozillazg/go-slugify/slugify
$ slugify "北京kožušček,abc"
bei-jing-kozuscek-abc

Documentation

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

Usage

package main

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

func main() {
	s := "北京kožušček,abc"
	fmt.Println(slugify.Slugify(s))
	// Output: bei-jing-kozuscek-abc
}