Skip to content

Commit

Permalink
feat: change csv file name format (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: lennysgarage <[email protected]>
  • Loading branch information
lennysgarage authored May 21, 2023
1 parent ce8dee6 commit c6b109a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func writeList(link string, movies []fetchlist.Movie) error {
link = strings.Replace(link, "https://letterboxd.com/", "", 1) // remove url in name of file

file, err := os.Create(fmt.Sprintf("%s.csv", strings.Replace(link, "/", ":", -1)))
file, err := os.Create(fmt.Sprintf("%s.csv", strings.Trim(strings.Replace(link, "/", "-", -1), "-")))
if err != nil {
return err
}
Expand Down

0 comments on commit c6b109a

Please sign in to comment.