mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-28 16:56:26 +00:00
fixme
This commit is contained in:
parent
e318f94283
commit
b750341e0d
1
main.go
1
main.go
@ -122,6 +122,7 @@ func mkdirAll(path string) error {
|
||||
}
|
||||
|
||||
// NOTE: directory is not exists
|
||||
// FIXME: fix rights
|
||||
if err := os.MkdirAll(path, 0o755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
|
||||
// Generate slugs similar to GitHub's slugs on markdown parsing
|
||||
func Generate(text string) string {
|
||||
// FIXME: this is should be like regexp.Replace(`[^-a-zA-Z\d]+`, ``)
|
||||
s := strings.ReplaceAll(text, "/", "")
|
||||
return slugify.Slugify(strings.TrimSpace(s))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user