Skip to content

mozillazg/go-slugify

Repository files navigation

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
}