In order to make semi-random slugs, I'd like to use first 8 characters of uuid. So I have
import (
fmt
"github.com/satori/go.uuid"
)
u1 := uuid.NewV4()
fmt.Println("u1 :", u1)
runes := []rune(u1)
slug := string(runes[0:7])
But in compile time I get this error:
cannot convert u1 (type uuid.UUID) to type []rune
How can I fix it?