add pub date to chapter skeleton

This commit is contained in:
lapwat
2023-10-01 22:07:38 +02:00
parent 2cbcf17cc2
commit 4521497d12
3 changed files with 12 additions and 9 deletions

View File

@@ -1,10 +1,13 @@
package book
import "time"
type link struct {
Href string `json:"url"`
Text string `json:"name"`
Href string `json:"url"`
Text string `json:"name"`
Date *time.Time `json:"date"`
}
func NewLink(href, text string) link {
return link{href, text}
func NewLink(href, text string, date *time.Time) link {
return link{href, text, date}
}