mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 21:20:40 +00:00
20 lines
333 B
Go
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
|
||
|
}
|