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

20 lines
333 B
Go
Raw Normal View History

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
}