0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-24 01:00:39 +00:00
git-sv/sv/formatter_functions.go

22 lines
352 B
Go
Raw Normal View History

package sv
import "time"
func timeFormat(t time.Time, format string) string {
if t.IsZero() {
return ""
}
2023-10-12 14:18:25 +00:00
return t.Format(format)
}
2023-10-12 14:18:25 +00:00
func getSection(sections []ReleaseNoteSection, name string) ReleaseNoteSection { //nolint:ireturn
for _, section := range sections {
if section.SectionName() == name {
return section
}
}
2023-10-12 14:18:25 +00:00
return nil
}