Fixed naming

This commit is contained in:
マリウス 2020-10-23 20:51:51 +01:00
parent 2d7dbddf5c
commit 109494bb0c
No known key found for this signature in database
GPG key ID: C228EF0A530AF06F

View file

@ -104,15 +104,15 @@ func ParseTime(timeStr string) (time.Time, error) {
} }
} }
func GetIdFromName(projectName string) string { func GetIdFromName(name string) string {
reg, regerr := regexp.Compile("[^a-zA-Z0-9]+") reg, regerr := regexp.Compile("[^a-zA-Z0-9]+")
if regerr != nil { if regerr != nil {
return "" return ""
} }
projectId := strings.ToLower(reg.ReplaceAllString(projectName, "")) id := strings.ToLower(reg.ReplaceAllString(name, ""))
return projectId return id
} }
func GetISOCalendarWeek(date time.Time) (int) { func GetISOCalendarWeek(date time.Time) (int) {