mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-13 11:14:37 -05:00
fixme
This commit is contained in:
parent
e318f94283
commit
b750341e0d
2 changed files with 2 additions and 0 deletions
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 a new issue