type Syncer … // SetError sets the error that the Sync method will return. func (s *Syncer) SetError(err error) { … } // Sync records that it was called, then returns the user-supplied error (if // any). func (s *Syncer) Sync() error { … } // Called reports whether the Sync method was called. func (s *Syncer) Called() bool { … } type Discarder … // Write implements io.Writer. func (d *Discarder) Write(b []byte) (int, error) { … } type FailWriter … // Write implements io.Writer. func (w FailWriter) Write(b []byte) (int, error) { … } type ShortWriter … // Write implements io.Writer. func (w ShortWriter) Write(b []byte) (int, error) { … } type Buffer … // Lines returns the current buffer contents, split on newlines. func (b *Buffer) Lines() []string { … } // Stripped returns the current buffer contents with the last trailing newline // stripped. func (b *Buffer) Stripped() string { … }