shortPath returns the short path of the current file. Only supports the `name` attribute.
()
| 107 | // shortPath returns the short path of the current file. Only supports the |
| 108 | // `name` attribute. |
| 109 | func (p *FormatParams) shortPath() (interface{}, error) { |
| 110 | if p.Attribute != "name" { |
| 111 | return nil, nil |
| 112 | } |
| 113 | return p.Info.Name(), nil |
| 114 | } |
| 115 | |
| 116 | // hash applies the provided hash algorithm h with ComputeHash. |
| 117 | func (p *FormatParams) hash(h hash.Hash) (interface{}, error) { |