From d5c85c16b94d1d858902e6c3f16a8847166f223e Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 30 Dec 2023 12:17:36 +0100 Subject: [PATCH] Clean up yaml output --- resource.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resource.go b/resource.go index 7395bda..29c232a 100644 --- a/resource.go +++ b/resource.go @@ -32,14 +32,15 @@ func (ds ResourceStatus) String() string { // uniquely identified by a URL. type Resource struct { URL URL - Status ResourceStatus - Pinned bool - LastChecked time.Time + Status ResourceStatus `yaml:"-"` + Pinned bool `yaml:"-"` + LastChecked time.Time `yaml:"last_checked"` // only set if Status == ResourceStatusError - ErrorString string + ErrorString string `yaml:"error"` // Indicate the URLs of resources which link to/are linked from this // resource. - IncomingLinkURLs, OutgoingLinkURLs []URL + IncomingLinkURLs []URL `yaml:"incoming_links"` + OutgoingLinkURLs []URL `yaml:"outgoing_links"` }