Skip to content

Instantly share code, notes, and snippets.

View Luit's full-sized avatar

Luit van Drongelen Luit

View GitHub Profile
@Luit
Luit / utils.go
Last active December 24, 2015 23:49
package utils
func Slugify(title string) string {
var slug []byte
for _, x := range title {
switch {
case ('a' <= x && x <= 'z') || ('0' <= x && x <= '9'):
slug = append(slug, byte(x))
case 'A' <= x && x <= 'Z':