mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-13 21:30:40 +00:00
7871515ac0
issue: #40
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
|
|
}
|