summaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-06-27 18:00:20 +0200
committerBjørn Erik Pedersen <[email protected]>2021-06-27 18:00:20 +0200
commit6cd2110ab295f598907a18da91e34d31407c1d9d (patch)
tree35d82731db58664b810133eb764cb8ca54223f73 /commands
parent6a365c2712c7607e067e192d213b266f0c88d0f3 (diff)
downloadhugo-6cd2110ab295f598907a18da91e34d31407c1d9d.tar.gz
hugo-6cd2110ab295f598907a18da91e34d31407c1d9d.zip
commands: Add version time to "hugo config mounts"
Diffstat (limited to 'commands')
-rw-r--r--commands/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/config.go b/commands/config.go
index 56692651c..2b2920cdd 100644
--- a/commands/config.go
+++ b/commands/config.go
@@ -21,6 +21,7 @@ import (
"regexp"
"sort"
"strings"
+ "time"
"github.com/gohugoio/hugo/common/maps"
@@ -146,6 +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"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Meta map[string]interface{} `json:"meta"`
@@ -155,6 +157,7 @@ func (m *modMounts) MarshalJSON() ([]byte, error) {
}{
Path: m.m.Path(),
Version: m.m.Version(),
+ Time: m.m.Time(),
Owner: ownerPath,
Dir: m.m.Dir(),
Meta: config.Params,
@@ -166,12 +169,14 @@ func (m *modMounts) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Path string `json:"path"`
Version string `json:"version"`
+ Time *time.Time `json:"time"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Mounts []modMount `json:"mounts"`
}{
Path: m.m.Path(),
Version: m.m.Version(),
+ Time: m.m.Time(),
Owner: ownerPath,
Dir: m.m.Dir(),
Mounts: mounts,