// TruncateWriter returns a Writer that writes to w // but stops silently after n bytes. func TruncateWriter(w io.Writer, n int64) io.Writer { … } type truncateWriter … func (t *truncateWriter) Write(p []byte) (n int, err error) { … }
// TruncateWriter returns a Writer that writes to w // but stops silently after n bytes. func TruncateWriter(w io.Writer, n int64) io.Writer { … } type truncateWriter … func (t *truncateWriter) Write(p []byte) (n int, err error) { … }