mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 01:00:39 +00:00
22 lines
352 B
Go
22 lines
352 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 { //nolint:ireturn
|
|
for _, section := range sections {
|
|
if section.SectionName() == name {
|
|
return section
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|