modules: Use value type for module.Time

Which is in line with how we do it elsewhere.
This commit is contained in:
Bjørn Erik Pedersen
2021-06-27 18:06:52 +02:00
parent 6cd2110ab2
commit 3a6dc6d3f4
2 changed files with 7 additions and 6 deletions

View File

@@ -147,7 +147,7 @@ func (m *modMounts) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Path string `json:"path"`
Version string `json:"version"`
Time *time.Time `json:"time"`
Time time.Time `json:"time"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Meta map[string]interface{} `json:"meta"`
@@ -169,7 +169,7 @@ func (m *modMounts) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Path string `json:"path"`
Version string `json:"version"`
Time *time.Time `json:"time"`
Time time.Time `json:"time"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Mounts []modMount `json:"mounts"`