You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
379 B

  1. // Copyright 2013 The Go Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style
  4. // license that can be found in the LICENSE file or at
  5. // https://developers.google.com/open-source/licenses/bsd.
  6. package doc
  7. type sliceWriter struct{ p *[]byte }
  8. func (w sliceWriter) Write(p []byte) (int, error) {
  9. *w.p = append(*w.p, p...)
  10. return len(p), nil
  11. }