MCPcopy Create free account
hub / github.com/AdRoll/baker / Close

Method Close

input/inpututils/compressedstream.go:100–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func (i *inputStatsReader) Close() error {
101 // If we knew the size of the file in advanced, and it's not been fully
102 // processed for any rason (eg: truncated network connection), remove the
103 // remaining size from the total size, so that the ETA estimation is
104 // still correct.
105 if i.sz != 0 {
106 rem := i.sz - atomic.LoadInt64(&i.n)
107 if rem >= 0 {
108 atomic.AddInt64(&i.s.totalSize, -rem)
109 }
110 }
111 atomic.AddInt64(&i.s.processedFiles, 1)
112
113 return i.r.Close()
114}
115
116func newInputStats() *inputStats {
117 s := new(inputStats)

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected