GOPackageHeaderServer/web/utils/counting-writer.go
Captain ALM 0d4036d05c
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Refactor and add cache and range support.
2022-07-12 15:41:50 +01:00

11 lines
172 B
Go

package utils
type CountingWriter struct {
Length int64
}
func (c *CountingWriter) Write(p []byte) (n int, err error) {
c.Length += int64(len(p))
return len(p), nil
}