1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-07-26 00:00:29 +00:00

hierarchy: comment on interface used

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-11-05 09:00:35 -05:00
parent 2de52e4fb9
commit 016c34ecb9
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED

View file

@ -11,7 +11,8 @@ type DirectoryHierarchy struct {
Entries []Entry
}
// WriteTo simplifies the output of the resulting hierarchy spec
// WriteTo simplifies the output of the resulting hierarchy spec.
// Satisfies the `io.WriterTo` interface.
func (dh DirectoryHierarchy) WriteTo(w io.Writer) (n int64, err error) {
sort.Sort(byPos(dh.Entries))
var sum int64