0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-24 11:10:39 +00:00
git-sv/sv/formatter_functions.go
2022-02-28 23:40:29 -03:00

20 lines
333 B
Go

package sv
import "time"
func timeFormat(t time.Time, format string) string {
if t.IsZero() {
return ""
}
return t.Format(format)
}
func getSection(sections []ReleaseNoteSection, name string) ReleaseNoteSection {
for _, section := range sections {
if section.SectionName() == name {
return section
}
}
return nil
}