Slugify: Replace gosimple/slug with a simple function (#59517)

This commit is contained in:
Ryan McKinley
2022-11-30 08:12:56 -08:00
committed by GitHub
parent 000de83eb4
commit 5b71a16acf
13 changed files with 443 additions and 56 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/go-sql-driver/mysql"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/slugify"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/folder"
@@ -170,7 +171,7 @@ func (ss *sqlStore) Get(ctx context.Context, q folder.GetFolderQuery) (*folder.F
}
return nil
})
foldr.Url = models.GetFolderUrl(foldr.UID, models.SlugifyTitle(foldr.Title))
foldr.Url = models.GetFolderUrl(foldr.UID, slugify.Slugify(foldr.Title))
return foldr, err
}