|
hai 1 ano | |
---|---|---|
.. | ||
README.md | %!s(int64=2) %!d(string=hai) anos | |
field.go | hai 1 ano | |
messages.go | %!s(int64=2) %!d(string=hai) anos | |
slug_test.go | %!s(int64=2) %!d(string=hai) anos |
Slug provides an easy way to create a pretty URL for your model.
Use slug.Slug
as your field type with the same name as the benefactor field, from which the slug's value should be dynamically derived, and prepended with WithSlug
, for example:
type User struct {
gorm.Model
Name string
NameWithSlug slug.Slug
}
Released under the MIT License.