summaryrefslogtreecommitdiffstats
path: root/resource
diff options
context:
space:
mode:
authorVas Sudanagunta <vas@commonkarma.org>2018-05-25 19:59:58 -0400
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-26 09:43:47 +0200
commit4f0665f476e06e9707621c18f7422fdeb776e0d1 (patch)
treeac37abe103e0aa0744769145feeab5138737bdd0 /resource
parentfc8c5ad824160cbf0868a8fb54c24a382626c73c (diff)
Enhance Page and Resource String()
Diffstat (limited to 'resource')
-rw-r--r--resource/resource.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/resource/resource.go b/resource/resource.go
index e92706803..0714805e8 100644
--- a/resource/resource.go
+++ b/resource/resource.go
@@ -419,8 +419,6 @@ type genericResource struct {
// The relative path to this resource.
relTargetPath dirFile
- file string
-
// Base is set when the output format's path has a offset, e.g. for AMP.
base string
@@ -554,6 +552,10 @@ func (l *genericResource) AbsSourceFilename() string {
return l.sourceFilename
}
+func (l *genericResource) String() string {
+ return fmt.Sprintf("Resource(%s: %s)", l.resourceType, l.name)
+}
+
func (l *genericResource) Publish() error {
f, err := l.sourceFs().Open(l.AbsSourceFilename())
if err != nil {