0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-09-20 00:02:46 +02: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 16:18:25 +02:00
return t.Format(format)
}
2023-10-12 16:18:25 +02:00
func getSection(sections []ReleaseNoteSection, name string) ReleaseNoteSection { //nolint:ireturn
for _, section := range sections {
if section.SectionName() == name {
return section
}
}
2023-10-12 16:18:25 +02:00
return nil
}