diff options
author | Vas Sudanagunta <[email protected]> | 2018-05-25 19:59:58 -0400 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-05-26 09:43:47 +0200 |
commit | 4f0665f476e06e9707621c18f7422fdeb776e0d1 (patch) | |
tree | ac37abe103e0aa0744769145feeab5138737bdd0 /resource | |
parent | fc8c5ad824160cbf0868a8fb54c24a382626c73c (diff) | |
download | hugo-4f0665f476e06e9707621c18f7422fdeb776e0d1.tar.gz hugo-4f0665f476e06e9707621c18f7422fdeb776e0d1.zip |
Enhance Page and Resource String()
Diffstat (limited to 'resource')
-rw-r--r-- | resource/resource.go | 6 |
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 { |