diff --git a/Source/archive/tar/tar.md b/Source/archive/tar/tar.md index e8ad56d..a6ef19c 100644 --- a/Source/archive/tar/tar.md +++ b/Source/archive/tar/tar.md @@ -94,7 +94,7 @@ Example: - [Package (Minimal)](#example_minimal) ### Package files - [common.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/common.go) [format.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/format.go) [reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/reader.go) [stat_actime1.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/stat_actime1.go) [stat_unix.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/stat_unix.go) [strconv.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/strconv.go) [writer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/tar/writer.go) + [common.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/common.go) [format.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/format.go) [reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/reader.go) [stat_actime1.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/stat_actime1.go) [stat_unix.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/stat_unix.go) [strconv.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/strconv.go) [writer.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/tar/writer.go)
type Format int@@ -237,12 +237,12 @@ The Writer currently provides no support for sparse files. Constants to identify various tar formats. -
func (f Format) String() string-
type Header struct { Typeflag byte // Type of header entry (should be TypeReg for most files) @@ -314,7 +314,7 @@ it in some ways, and then pass it back to Writer.WriteHeader should do so by creating a new Header and copying the fields that they are interested in preserving. -func FileInfoHeader +
func FileInfoHeader ¶
func FileInfoHeader(fi os.FileInfo, link string) (*Header, error)@@ -326,13 +326,13 @@ Since os.FileInfo's Name method only returns the base name of the file it describes, it may be necessary to modify Header.Name to provide the full path name of the file. -func (*Header) FileInfo +
func (*Header) FileInfo ¶
func (h *Header) FileInfo() os.FileInfoFileInfo returns an os.FileInfo for the Header. -type Reader +
type Reader ¶
type Reader struct { // contains filtered or unexported fields @@ -342,13 +342,13 @@ Reader provides sequential access to the contents of a tar archive. Reader.Next advances to the next file in the archive (including the first), and then Reader can be treated as an io.Reader to access the file's data. -func NewReader +
func NewReader ¶
func NewReader(r io.Reader) *ReaderNewReader creates a new Reader reading from r. -func (*Reader) Next +
func (*Reader) Next ¶
func (tr *Reader) Next() (*Header, error)@@ -358,7 +358,7 @@ file is automatically discarded. io.EOF is returned at the end of the input. -func (*Reader) Read +
func (*Reader) Read ¶
func (tr *Reader) Read(b []byte) (int, error)@@ -373,7 +373,7 @@ Calling Read on special types like TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, and TypeFifo returns (0, io.EOF) regardless of what the Header.Size claims. -type Writer +
type Writer ¶
type Writer struct { // contains filtered or unexported fields @@ -383,13 +383,13 @@ Writer provides sequential writing of a tar archive. Write.WriteHeader begins a new file with the provided Header, and then Writer can be treated as an io.Writer to supply that file's data. --func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer) *WriterNewWriter creates a new Writer writing to w. -func (*Writer) Close +
func (*Writer) Close ¶
func (tw *Writer) Close() error@@ -397,7 +397,7 @@ Close closes the tar archive by flushing the padding, and writing the footer. If the current file (from a prior call to WriteHeader) is not fully written, then this returns an error. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (tw *Writer) Flush() error@@ -407,7 +407,7 @@ be fully written before Flush can be called. This is unnecessary as the next call to WriteHeader or Close will implicitly flush out the file's padding. -func (*Writer) Write +
func (*Writer) Write ¶
func (tw *Writer) Write(b []byte) (int, error)@@ -418,7 +418,7 @@ Calling Write on special types like TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, and TypeFifo returns (0, ErrWriteTooLong) regardless of what the Header.Size claims. -func (*Writer) WriteHeader +
func (*Writer) WriteHeader ¶
func (tw *Writer) WriteHeader(hdr *Header) errordiff --git a/Source/archive/zip/zip.md b/Source/archive/zip/zip.md index a29c459..bf2eb64 100644 --- a/Source/archive/zip/zip.md +++ b/Source/archive/zip/zip.md @@ -59,7 +59,7 @@ fields will be 0xffffffff and the 64 bit fields must be used instead. - [Writer.RegisterCompressor](#exampleWriter_RegisterCompressor) ### Package files - [reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/zip/reader.go) [register.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/zip/register.go) [struct.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/zip/struct.go) [writer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/archive/zip/writer.go) + [reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/zip/reader.go) [register.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/zip/register.go) [struct.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/zip/struct.go) [writer.go](//github.com/golang/go/blob/release-branch.go1.10/src/archive/zip/writer.go)Constants
@@ -79,21 +79,21 @@ Compression methods. )func RegisterCompressor +
func RegisterCompressor ¶
func RegisterCompressor(method uint16, comp Compressor)RegisterCompressor registers custom compressors for a specified method ID. The common methods Store and Deflate are built in. -func RegisterDecompressor +
func RegisterDecompressor ¶
func RegisterDecompressor(method uint16, dcomp Decompressor)RegisterDecompressor allows custom decompressors for a specified method ID. The common methods Store and Deflate are built in. -type Compressor +
type Compressor ¶
type Compressor func(w io.Writer) (io.WriteCloser, error)@@ -102,7 +102,7 @@ Close method must be used to flush pending data to w. The Compressor itself must be safe to invoke from multiple goroutines simultaneously, but each returned writer will be used only by one goroutine at a time. -type Decompressor +
type Decompressor ¶
type Decompressor func(r io.Reader) io.ReadCloser@@ -112,7 +112,7 @@ Decompressor itself must be safe to invoke from multiple goroutines simultaneously, but each returned reader will be used only by one goroutine at a time. -type File +
type File ¶
type File struct { FileHeader @@ -120,7 +120,7 @@ time. }-func (*File) DataOffset +
func (*File) DataOffset ¶
func (f *File) DataOffset() (offset int64, err error)@@ -130,14 +130,14 @@ to the beginning of the zip file. Most callers should instead use Open, which transparently decompresses data and verifies checksums. -func (*File) Open +
func (*File) Open ¶
func (f *File) Open() (io.ReadCloser, error)Open returns a ReadCloser that provides access to the File's contents. Multiple files may be read concurrently. -type FileHeader +
type FileHeader ¶
type FileHeader struct { // Name is the name of the file. @@ -190,7 +190,7 @@ files may be read concurrently. FileHeader describes a file within a zip file. See the zip spec for details. -func FileInfoHeader +
func FileInfoHeader ¶
func FileInfoHeader(fi os.FileInfo) (*FileHeader, error)@@ -200,13 +200,13 @@ describes, it may be necessary to modify the Name field of the returned header to provide the full path name of the file. If compression is desired, callers should set the FileHeader.Method field; it is unset by default. -func (*FileHeader) FileInfo +
func (*FileHeader) FileInfo ¶
func (h *FileHeader) FileInfo() os.FileInfoFileInfo returns an os.FileInfo for the FileHeader. -func (*FileHeader) ModTime +
func (*FileHeader) ModTime ¶
func (h *FileHeader) ModTime() time.Time@@ -215,13 +215,13 @@ ModifiedTime fields. Deprecated: Use Modified instead. -func (*FileHeader) Mode +
func (*FileHeader) Mode ¶
func (h *FileHeader) Mode() (mode os.FileMode)Mode returns the permission and mode bits for the FileHeader. -func (*FileHeader) SetModTime +
func (*FileHeader) SetModTime ¶
func (h *FileHeader) SetModTime(t time.Time)@@ -230,13 +230,13 @@ time in UTC. Deprecated: Use Modified instead. -func (*FileHeader) SetMode +
func (*FileHeader) SetMode ¶
func (h *FileHeader) SetMode(mode os.FileMode)SetMode changes the permission and mode bits for the FileHeader. -type ReadCloser +
type ReadCloser ¶
type ReadCloser struct { Reader @@ -244,19 +244,19 @@ SetMode changes the permission and mode bits for the FileHeader. }-func OpenReader +
func OpenReader ¶
func OpenReader(name string) (*ReadCloser, error)OpenReader will open the Zip file specified by name and return a ReadCloser. -func (*ReadCloser) Close +
func (*ReadCloser) Close ¶
func (rc *ReadCloser) Close() errorClose closes the Zip file, rendering it unusable for I/O. -type Reader +
type Reader ¶
type Reader struct { File []*File @@ -294,14 +294,14 @@ Example: // Contents of README: // This is the source code repository for the Go programming language. -func NewReader +
func NewReader ¶
func NewReader(r io.ReaderAt, size int64) (*Reader, error)NewReader returns a new Reader reading from r, which is assumed to have the given size in bytes. -func (*Reader) RegisterDecompressor +
func (*Reader) RegisterDecompressor ¶
func (z *Reader) RegisterDecompressor(method uint16, dcomp Decompressor)@@ -309,7 +309,7 @@ RegisterDecompressor registers or overrides a custom decompressor for a specific method ID. If a decompressor for a given method is not found, Reader will default to looking up the decompressor at the package level. -type Writer +
type Writer ¶
type Writer struct { // contains filtered or unexported fields @@ -351,20 +351,20 @@ Example: log.Fatal(err) } -func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer) *WriterNewWriter returns a new Writer writing a zip file to w. -func (*Writer) Close +
func (*Writer) Close ¶
func (w *Writer) Close() errorClose finishes writing the zip file by writing the central directory. It does not (and cannot) close the underlying writer. -func (*Writer) Create +
func (*Writer) Create ¶
func (w *Writer) Create(name string) (io.Writer, error)@@ -375,7 +375,7 @@ not start with a drive letter (e.g. C:) or leading slash, and only forward slashes are allowed. The file's contents must be written to the io.Writer before the next call to Create, CreateHeader, or Close. -func (*Writer) CreateHeader +
func (*Writer) CreateHeader ¶
func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error)@@ -387,14 +387,14 @@ This returns a Writer to which the file contents should be written. The file's contents must be written to the io.Writer before the next call to Create, CreateHeader, or Close. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (w *Writer) Flush() errorFlush flushes any buffered data to the underlying writer. Calling Flush is not normally necessary; calling Close is sufficient. -func (*Writer) RegisterCompressor +
func (*Writer) RegisterCompressor ¶
func (w *Writer) RegisterCompressor(method uint16, comp Compressor)@@ -420,14 +420,14 @@ Example: // Proceed to add files to w. -func (*Writer) SetComment +
func (*Writer) SetComment ¶
func (w *Writer) SetComment(comment string) errorSetComment sets the end-of-central-directory comment field. It can only be called before Close. -func (*Writer) SetOffset +
func (*Writer) SetOffset ¶
func (w *Writer) SetOffset(n int64)diff --git a/Source/bufio/bufio.md b/Source/bufio/bufio.md index eec934c..51bdd02 100644 --- a/Source/bufio/bufio.md +++ b/Source/bufio/bufio.md @@ -69,7 +69,7 @@ interface but provides buffering and some help for textual I/O. - [Writer](#exampleWriter) ### Package files - [bufio.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bufio/bufio.go) [scan.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bufio/scan.go) + [bufio.go](//github.com/golang/go/blob/release-branch.go1.10/src/bufio/bufio.go) [scan.go](//github.com/golang/go/blob/release-branch.go1.10/src/bufio/scan.go)Constants
@@ -110,13 +110,13 @@ processing early or when it is necessary to deliver a final empty token. One could achieve the same behavior with a custom error value but providing one here is tidier. See the emptyFinalToken example for a use of this value. -func ScanBytes +
func ScanBytes ¶
func ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error)ScanBytes is a split function for a Scanner that returns each byte as a token. -func ScanLines +
func ScanLines ¶
func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error)@@ -126,7 +126,7 @@ end-of-line marker is one optional carriage return followed by one mandatory newline. In regular expression notation, it is `\r?\n`. The last non-empty line of input will be returned even if it has no newline. -func ScanRunes +
func ScanRunes ¶
func ScanRunes(data []byte, atEOF bool) (advance int, token []byte, err error)@@ -137,7 +137,7 @@ translate to U+FFFD = "\xef\xbf\xbd". Because of the Scan interface, this makes it impossible for the client to distinguish correctly encoded replacement runes from encoding errors. -func ScanWords +
func ScanWords ¶
func ScanWords(data []byte, atEOF bool) (advance int, token []byte, err error)@@ -145,7 +145,7 @@ ScanWords is a split function for a Scanner that returns each space-separated word of text, with surrounding spaces deleted. It will never return an empty string. The definition of space is set by unicode.IsSpace. -type ReadWriter +
type ReadWriter ¶
type ReadWriter struct { *Reader @@ -155,13 +155,13 @@ string. The definition of space is set by unicode.IsSpace. ReadWriter stores pointers to a Reader and a Writer. It implements io.ReadWriter. -func NewReadWriter +
func NewReadWriter ¶
func NewReadWriter(r *Reader, w *Writer) *ReadWriterNewReadWriter allocates a new ReadWriter that dispatches to r and w. -type Reader +
type Reader ¶
type Reader struct { // contains filtered or unexported fields @@ -169,13 +169,13 @@ NewReadWriter allocates a new ReadWriter that dispatches to r and w. Reader implements buffering for an io.Reader object. -func NewReader +
func NewReader ¶
func NewReader(rd io.Reader) *ReaderNewReader returns a new Reader whose buffer has the default size. -func NewReaderSize +
func NewReaderSize ¶
func NewReaderSize(rd io.Reader, size int) *Reader@@ -183,13 +183,13 @@ NewReaderSize returns a new Reader whose buffer has at least the specified size. If the argument io.Reader is already a Reader with large enough size, it returns the underlying Reader. -func (*Reader) Buffered +
func (*Reader) Buffered ¶
func (b *Reader) Buffered() intBuffered returns the number of bytes that can be read from the current buffer. -func (*Reader) Discard +
func (*Reader) Discard ¶
func (b *Reader) Discard(n int) (discarded int, err error)@@ -199,7 +199,7 @@ If Discard skips fewer than n bytes, it also returns an error. If 0 <= n <= b.Buffered(), Discard is guaranteed to succeed without reading from the underlying io.Reader. -func (*Reader) Peek +
func (*Reader) Peek ¶
func (b *Reader) Peek(n int) ([]byte, error)@@ -208,7 +208,7 @@ valid at the next read call. If Peek returns fewer than n bytes, it also returns an error explaining why the read is short. The error is ErrBufferFull if n is larger than b's buffer size. -func (*Reader) Read +
func (*Reader) Read ¶
func (b *Reader) Read(p []byte) (n int, err error)@@ -216,14 +216,14 @@ Read reads data into p. It returns the number of bytes read into p. The bytes are taken from at most one Read on the underlying Reader, hence n may be less than len(p). At EOF, the count will be zero and err will be io.EOF. -func (*Reader) ReadByte +
func (*Reader) ReadByte ¶
func (b *Reader) ReadByte() (byte, error)ReadByte reads and returns a single byte. If no byte is available, returns an error. -func (*Reader) ReadBytes +
func (*Reader) ReadBytes ¶
func (b *Reader) ReadBytes(delim byte) ([]byte, error)@@ -234,7 +234,7 @@ the error and the error itself (often io.EOF). ReadBytes returns err != nil if and only if the returned data does not end in delim. For simple uses, a Scanner may be more convenient. -func (*Reader) ReadLine +
func (*Reader) ReadLine ¶
func (b *Reader) ReadLine() (line []byte, isPrefix bool, err error)@@ -254,7 +254,7 @@ Calling UnreadByte after ReadLine will always unread the last byte read (possibly a character belonging to the line end) even if that byte is not part of the line returned by ReadLine. -func (*Reader) ReadRune +
func (*Reader) ReadRune ¶
func (b *Reader) ReadRune() (r rune, size int, err error)@@ -262,7 +262,7 @@ ReadRune reads a single UTF-8 encoded Unicode character and returns the rune and its size in bytes. If the encoded rune is invalid, it consumes one byte and returns unicode.ReplacementChar (U+FFFD) with a size of 1. -func (*Reader) ReadSlice +
func (*Reader) ReadSlice ¶
func (b *Reader) ReadSlice(delim byte) (line []byte, err error)@@ -275,7 +275,7 @@ Because the data returned from ReadSlice will be overwritten by the next I/O operation, most clients should use ReadBytes or ReadString instead. ReadSlice returns err != nil if and only if line does not end in delim. -func (*Reader) ReadString +
func (*Reader) ReadString ¶
func (b *Reader) ReadString(delim byte) (string, error)@@ -286,27 +286,27 @@ the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim. For simple uses, a Scanner may be more convenient. -func (*Reader) Reset +
func (*Reader) Reset ¶
func (b *Reader) Reset(r io.Reader)Reset discards any buffered data, resets all state, and switches the buffered reader to read from r. -func (*Reader) Size +
func (*Reader) Size ¶
func (r *Reader) Size() intSize returns the size of the underlying buffer in bytes. -func (*Reader) UnreadByte +
func (*Reader) UnreadByte ¶
func (b *Reader) UnreadByte() errorUnreadByte unreads the last byte. Only the most recently read byte can be unread. -func (*Reader) UnreadRune +
func (*Reader) UnreadRune ¶
func (b *Reader) UnreadRune() error@@ -315,14 +315,14 @@ buffer was not a ReadRune, UnreadRune returns an error. (In this regard it is stricter than UnreadByte, which will unread the last byte from any read operation.) -func (*Reader) WriteTo +
func (*Reader) WriteTo ¶
func (b *Reader) WriteTo(w io.Writer) (n int64, err error)WriteTo implements io.WriterTo. This may make multiple calls to the Read method of the underlying Reader. -type Scanner +
type Scanner ¶
type Scanner struct { // contains filtered or unexported fields @@ -433,14 +433,14 @@ Example: fmt.Printf("%d\n", count) // Output: 15 -func NewScanner +
func NewScanner ¶
func NewScanner(r io.Reader) *ScannerNewScanner returns a new Scanner to read from r. The split function defaults to ScanLines. -func (*Scanner) Buffer +
func (*Scanner) Buffer ¶
func (s *Scanner) Buffer(buf []byte, max int)@@ -454,7 +454,7 @@ MaxScanTokenSize. Buffer panics if it is called after scanning has started. -func (*Scanner) Bytes +
func (*Scanner) Bytes ¶
func (s *Scanner) Bytes() []byte@@ -462,13 +462,13 @@ Bytes returns the most recent token generated by a call to Scan. The underlying array may point to data that will be overwritten by a subsequent call to Scan. It does no allocation. -func (*Scanner) Err +
func (*Scanner) Err ¶
func (s *Scanner) Err() errorErr returns the first non-EOF error that was encountered by the Scanner. -func (*Scanner) Scan +
func (*Scanner) Scan ¶
func (s *Scanner) Scan() bool@@ -480,7 +480,7 @@ was io.EOF, Err will return nil. Scan panics if the split function returns too many empty tokens without advancing the input. This is a common error mode for scanners. -func (*Scanner) Split +
func (*Scanner) Split ¶
func (s *Scanner) Split(split SplitFunc)@@ -489,14 +489,14 @@ ScanLines. Split panics if it is called after scanning has started. -func (*Scanner) Text +
func (*Scanner) Text ¶
func (s *Scanner) Text() stringText returns the most recent token generated by a call to Scan as a newly allocated string holding its bytes. -type SplitFunc +
type SplitFunc ¶
type SplitFunc func(data []byte, atEOF bool) (advance int, token []byte, err error)@@ -516,7 +516,7 @@ The function is never called with an empty data slice unless atEOF is true. If atEOF is true, however, data may be non-empty and, as always, holds unprocessed text. -type Writer +
type Writer ¶
type Writer struct { // contains filtered or unexported fields @@ -537,13 +537,13 @@ Example: w.Flush() // Don't forget to flush! // Output: Hello, world! -func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer) *WriterNewWriter returns a new Writer whose buffer has the default size. -func NewWriterSize +
func NewWriterSize ¶
func NewWriterSize(w io.Writer, size int) *Writer@@ -551,45 +551,45 @@ NewWriterSize returns a new Writer whose buffer has at least the specified size. If the argument io.Writer is already a Writer with large enough size, it returns the underlying Writer. -func (*Writer) Available +
func (*Writer) Available ¶
func (b *Writer) Available() intAvailable returns how many bytes are unused in the buffer. -func (*Writer) Buffered +
func (*Writer) Buffered ¶
func (b *Writer) Buffered() intBuffered returns the number of bytes that have been written into the current buffer. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (b *Writer) Flush() errorFlush writes any buffered data to the underlying io.Writer. -func (*Writer) ReadFrom +
func (*Writer) ReadFrom ¶
func (b *Writer) ReadFrom(r io.Reader) (n int64, err error)ReadFrom implements io.ReaderFrom. -func (*Writer) Reset +
func (*Writer) Reset ¶
func (b *Writer) Reset(w io.Writer)Reset discards any unflushed buffered data, clears any error, and resets b to write its output to w. -func (*Writer) Size +
func (*Writer) Size ¶
func (b *Writer) Size() intSize returns the size of the underlying buffer in bytes. -func (*Writer) Write +
func (*Writer) Write ¶
func (b *Writer) Write(p []byte) (nn int, err error)@@ -597,20 +597,20 @@ Write writes the contents of p into the buffer. It returns the number of bytes written. If nn < len(p), it also returns an error explaining why the write is short. -func (*Writer) WriteByte +
func (*Writer) WriteByte ¶
func (b *Writer) WriteByte(c byte) errorWriteByte writes a single byte. -func (*Writer) WriteRune +
func (*Writer) WriteRune ¶
func (b *Writer) WriteRune(r rune) (size int, err error)WriteRune writes a single Unicode code point, returning the number of bytes written and any error. -func (*Writer) WriteString +
func (*Writer) WriteString ¶
func (b *Writer) WriteString(s string) (int, error)diff --git a/Source/builtin/builtin.md b/Source/builtin/builtin.md index 0eec7bd..027e742 100644 --- a/Source/builtin/builtin.md +++ b/Source/builtin/builtin.md @@ -56,7 +56,7 @@ identifiers. - [type uintptr](#uintptr) ### Package files - [builtin.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/builtin/builtin.go) + [builtin.go](//github.com/golang/go/blob/release-branch.go1.10/src/builtin/builtin.go)Constants
@@ -82,7 +82,7 @@ declaration. It is zero-indexed. nil is a predeclared identifier representing the zero value for a pointer, channel, func, interface, map, or slice type. -func append +
func append ¶
func append(slice []Type, elems ...Type) []Type@@ -99,7 +99,7 @@ As a special case, it is legal to append a string to a byte slice, like this: slice = append([]byte("hello "), "world"...) -func cap +
func cap ¶
func cap(v Type) int@@ -112,7 +112,7 @@ The cap built-in function returns the capacity of v, according to its type: Channel: the channel buffer capacity, in units of elements; if v is nil, cap(v) is zero. -func close +
func close ¶
func close(c chan<- Type)@@ -127,7 +127,7 @@ channel element. The form will also set ok to false for a closed channel. -func complex +
func complex ¶
func complex(r, i FloatType) ComplexType@@ -136,7 +136,7 @@ values. The real and imaginary parts must be of the same size, either float32 or float64 (or assignable to them), and the return value will be the corresponding complex type (complex64 for float32, complex128 for float64). -func copy +
func copy ¶
func copy(dst, src []Type) int@@ -145,21 +145,21 @@ destination slice. (As a special case, it also will copy bytes from a string to a slice of bytes.) The source and destination may overlap. Copy returns the number of elements copied, which will be the minimum of len(src) and len(dst). -func delete +
func delete ¶
func delete(m map[Type]Type1, key Type)The delete built-in function deletes the element with the specified key (m[key]) from the map. If m is nil or there is no such element, delete is a no-op. -func imag +
func imag ¶
func imag(c ComplexType) FloatTypeThe imag built-in function returns the imaginary part of the complex number c. The return value will be floating point type corresponding to the type of c. -func len +
func len ¶
func len(v Type) int@@ -172,7 +172,7 @@ The len built-in function returns the length of v, according to its type: Channel: the number of elements queued (unread) in the channel buffer; if v is nil, len(v) is zero. -func make +
func make ¶
func make(t Type, size ...IntegerType) Type@@ -194,7 +194,7 @@ to it. The specification of the result depends on the type: buffer capacity. If zero, or the size is omitted, the channel is unbuffered. -func new +
func new ¶
func new(Type) *Type@@ -202,7 +202,7 @@ The new built-in function allocates memory. The first argument is a type, not a value, and the value returned is a pointer to a newly allocated zero value of that type. -func panic +
func panic ¶
func panic(v interface{})@@ -217,7 +217,7 @@ is reported, including the value of the argument to panic. This termination sequence is called panicking and can be controlled by the built-in function recover. -func print +
func print ¶
func print(args ...Type)@@ -225,7 +225,7 @@ The print built-in function formats its arguments in an implementation-specific way and writes the result to standard error. Print is useful for bootstrapping and debugging; it is not guaranteed to stay in the language. -func println +
func println ¶
func println(args ...Type)@@ -234,14 +234,14 @@ implementation-specific way and writes the result to standard error. Spaces are always added between arguments and a newline is appended. Println is useful for bootstrapping and debugging; it is not guaranteed to stay in the language. -func real +
func real ¶
func real(c ComplexType) FloatTypeThe real built-in function returns the real part of the complex number c. The return value will be floating point type corresponding to the type of c. -func recover +
func recover ¶
func recover() interface{}@@ -254,69 +254,69 @@ In this case, or when the goroutine is not panicking, or if the argument supplied to panic was nil, recover returns nil. Thus the return value from recover reports whether the goroutine is panicking. -type ComplexType +
type ComplexType ¶
type ComplexType complex64ComplexType is here for the purposes of documentation only. It is a stand-in for either complex type: complex64 or complex128. -type FloatType +
type FloatType ¶
type FloatType float32FloatType is here for the purposes of documentation only. It is a stand-in for either float type: float32 or float64. -type IntegerType +
type IntegerType ¶
type IntegerType intIntegerType is here for the purposes of documentation only. It is a stand-in for any integer type: int, uint, int8 etc. -type Type +
type Type ¶
type Type intType is here for the purposes of documentation only. It is a stand-in for any Go type, but represents the same type for any given function invocation. -type Type1 +
type Type1 ¶
type Type1 intType1 is here for the purposes of documentation only. It is a stand-in for any Go type, but represents the same type for any given function invocation. -type bool +
type bool ¶
type bool boolbool is the set of boolean values, true and false. -type byte +
type byte ¶
type byte = uint8byte is an alias for uint8 and is equivalent to uint8 in all ways. It is used, by convention, to distinguish byte values from 8-bit unsigned integer values. -type complex128 +
type complex128 ¶
type complex128 complex128complex128 is the set of all complex numbers with float64 real and imaginary parts. -type complex64 +
type complex64 ¶
type complex64 complex64complex64 is the set of all complex numbers with float32 real and imaginary parts. -type error +
type error ¶
type error interface { Error() string @@ -325,59 +325,59 @@ parts. The error built-in interface type is the conventional interface for representing an error condition, with the nil value representing no error. -type float32 +
type float32 ¶
type float32 float32float32 is the set of all IEEE-754 32-bit floating-point numbers. -type float64 +
type float64 ¶
type float64 float64float64 is the set of all IEEE-754 64-bit floating-point numbers. -type int +
type int ¶
type int intint is a signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, int32. -type int16 +
type int16 ¶
type int16 int16int16 is the set of all signed 16-bit integers. Range: -32768 through 32767. -type int32 +
type int32 ¶
type int32 int32int32 is the set of all signed 32-bit integers. Range: -2147483648 through 2147483647. -type int64 +
type int64 ¶
type int64 int64int64 is the set of all signed 64-bit integers. Range: -9223372036854775808 through 9223372036854775807. -type int8 +
type int8 ¶
type int8 int8int8 is the set of all signed 8-bit integers. Range: -128 through 127. -type rune +
type rune ¶
type rune = int32rune is an alias for int32 and is equivalent to int32 in all ways. It is used, by convention, to distinguish character values from integer values. -type string +
type string ¶
type string string@@ -385,39 +385,39 @@ string is the set of all strings of 8-bit bytes, conventionally but not necessarily representing UTF-8-encoded text. A string may be empty, but not nil. Values of string type are immutable. -type uint +
type uint ¶
type uint uintuint is an unsigned integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, uint32. -type uint16 +
type uint16 ¶
type uint16 uint16uint16 is the set of all unsigned 16-bit integers. Range: 0 through 65535. -type uint32 +
type uint32 ¶
type uint32 uint32uint32 is the set of all unsigned 32-bit integers. Range: 0 through 4294967295. -type uint64 +
type uint64 ¶
type uint64 uint64uint64 is the set of all unsigned 64-bit integers. Range: 0 through 18446744073709551615. -type uint8 +
type uint8 ¶
type uint8 uint8uint8 is the set of all unsigned 8-bit integers. Range: 0 through 255. -type uintptr +
type uintptr ¶
type uintptr uintptrdiff --git a/Source/bytes/bytes.md b/Source/bytes/bytes.md index 3a011a8..3ae09e2 100644 --- a/Source/bytes/bytes.md +++ b/Source/bytes/bytes.md @@ -147,7 +147,7 @@ analogous to the facilities of the strings package. - [TrimSuffix](#exampleTrimSuffix) ### Package files - [buffer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/buffer.go) [bytes.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/bytes.go) [bytes_amd64.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/bytes_amd64.go) [bytes_decl.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/bytes_decl.go) [reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/reader.go) + [buffer.go](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/buffer.go) [bytes.go](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/bytes.go) [bytes_amd64.go](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/bytes_amd64.go) [bytes_decl.go](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/bytes_decl.go) [reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/reader.go)Constants
@@ -164,7 +164,7 @@ the contents of r, ReadFrom will not grow the underlying buffer. ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer. -func Compare +
func Compare ¶
func Compare(a, b []byte) int@@ -213,7 +213,7 @@ Example: // Found it! } -func Contains +
func Contains ¶
func Contains(b, subslice []byte) bool@@ -232,7 +232,7 @@ Example: // true // true -func ContainsAny +
func ContainsAny ¶
func ContainsAny(b []byte, chars string) bool@@ -252,7 +252,7 @@ Example: // false // false -func ContainsRune +
func ContainsRune ¶
func ContainsRune(b []byte, r rune) bool@@ -274,7 +274,7 @@ Example: // true // false -func Count +
func Count ¶
func Count(s, sep []byte) int@@ -290,7 +290,7 @@ Example: // 3 // 5 -func Equal +
func Equal ¶
func Equal(a, b []byte) bool@@ -306,7 +306,7 @@ Example: // true // false -func EqualFold +
func EqualFold ¶
func EqualFold(s, t []byte) bool@@ -319,7 +319,7 @@ Example: fmt.Println(bytes.EqualFold([]byte("Go"), []byte("go"))) // Output: true -func Fields +
func Fields ¶
func Fields(s []byte) [][]byte@@ -334,7 +334,7 @@ Example: fmt.Printf("Fields are: %q", bytes.Fields([]byte(" foo bar baz "))) // Output: Fields are: ["foo" "bar" "baz"] -func FieldsFunc +
func FieldsFunc ¶
func FieldsFunc(s []byte, f func(rune) bool) [][]byte@@ -354,7 +354,7 @@ Example: fmt.Printf("Fields are: %q", bytes.FieldsFunc([]byte(" foo1;bar2,baz3..."), f)) // Output: Fields are: ["foo1" "bar2" "baz3"] -func HasPrefix +
func HasPrefix ¶
func HasPrefix(s, prefix []byte) bool@@ -371,7 +371,7 @@ Example: // false // true -func HasSuffix +
func HasSuffix ¶
func HasSuffix(s, suffix []byte) bool@@ -390,7 +390,7 @@ Example: // false // true -func Index +
func Index ¶
func Index(s, sep []byte) int@@ -406,7 +406,7 @@ Example: // 4 // -1 -func IndexAny +
func IndexAny ¶
func IndexAny(s []byte, chars string) int@@ -424,7 +424,7 @@ Example: // 2 // -1 -func IndexByte +
func IndexByte ¶
func IndexByte(s []byte, c byte) int@@ -440,7 +440,7 @@ Example: // 4 // -1 -func IndexFunc +
func IndexFunc ¶
func IndexFunc(s []byte, f func(r rune) bool) int@@ -460,7 +460,7 @@ Example: // 7 // -1 -func IndexRune +
func IndexRune ¶
func IndexRune(s []byte, r rune) int@@ -478,7 +478,7 @@ Example: // 4 // -1 -func Join +
func Join ¶
func Join(s [][]byte, sep []byte) []byte@@ -492,7 +492,7 @@ Example: fmt.Printf("%s", bytes.Join(s, []byte(", "))) // Output: foo, bar, baz -func LastIndex +
func LastIndex ¶
func LastIndex(s, sep []byte) int@@ -510,7 +510,7 @@ Example: // 3 // -1 -func LastIndexAny +
func LastIndexAny ¶
func LastIndexAny(s []byte, chars string) int@@ -530,7 +530,7 @@ Example: // 3 // -1 -func LastIndexByte +
func LastIndexByte ¶
func LastIndexByte(s []byte, c byte) int@@ -548,7 +548,7 @@ Example: // 8 // -1 -func LastIndexFunc +
func LastIndexFunc ¶
func LastIndexFunc(s []byte, f func(r rune) bool) int@@ -567,7 +567,7 @@ Example: // 9 // -1 -func Map +
func Map ¶
func Map(mapping func(r rune) rune, s []byte) []byte@@ -591,7 +591,7 @@ Example: fmt.Printf("%s", bytes.Map(rot13, []byte("'Twas brillig and the slithy gopher..."))) // Output: 'Gjnf oevyyvt naq gur fyvgul tbcure... -func Repeat +
func Repeat ¶
func Repeat(b []byte, count int) []byte@@ -605,7 +605,7 @@ Example: fmt.Printf("ba%s", bytes.Repeat([]byte("na"), 2)) // Output: banana -func Replace +
func Replace ¶
func Replace(s, old, new []byte, n int) []byte@@ -623,7 +623,7 @@ Example: // oinky oinky oink // moo moo moo -func Runes +
func Runes ¶
func Runes(s []byte) []rune@@ -648,7 +648,7 @@ Example: // U+0065 'e' // U+0072 'r' -func Split +
func Split ¶
func Split(s, sep []byte) [][]byte@@ -669,7 +669,7 @@ Example: // [" " "x" "y" "z" " "] // [""] -func SplitAfter +
func SplitAfter ¶
func SplitAfter(s, sep []byte) [][]byte@@ -683,7 +683,7 @@ Example: fmt.Printf("%q\n", bytes.SplitAfter([]byte("a,b,c"), []byte(","))) // Output: ["a," "b," "c"] -func SplitAfterN +
func SplitAfterN ¶
func SplitAfterN(s, sep []byte, n int) [][]byte@@ -701,7 +701,7 @@ Example: fmt.Printf("%q\n", bytes.SplitAfterN([]byte("a,b,c"), []byte(","), 2)) // Output: ["a," "b,c"] -func SplitN +
func SplitN ¶
func SplitN(s, sep []byte, n int) [][]byte@@ -723,7 +723,7 @@ Example: // ["a" "b,c"] // [] (nil = true) -func Title +
func Title ¶
func Title(s []byte) []byte@@ -739,7 +739,7 @@ Example: fmt.Printf("%s", bytes.Title([]byte("her royal highness"))) // Output: Her Royal Highness -func ToLower +
func ToLower ¶
func ToLower(s []byte) []byte@@ -752,7 +752,7 @@ Example: fmt.Printf("%s", bytes.ToLower([]byte("Gopher"))) // Output: gopher -func ToLowerSpecial +
func ToLowerSpecial ¶
func ToLowerSpecial(c unicode.SpecialCase, s []byte) []byte@@ -760,7 +760,7 @@ ToLowerSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their lower case, giving priority to the special casing rules. -func ToTitle +
func ToTitle ¶
func ToTitle(s []byte) []byte@@ -776,7 +776,7 @@ Example: // LOUD NOISES // ХЛЕБ -func ToTitleSpecial +
func ToTitleSpecial ¶
func ToTitleSpecial(c unicode.SpecialCase, s []byte) []byte@@ -784,7 +784,7 @@ ToTitleSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case, giving priority to the special casing rules. -func ToUpper +
func ToUpper ¶
func ToUpper(s []byte) []byte@@ -797,7 +797,7 @@ Example: fmt.Printf("%s", bytes.ToUpper([]byte("Gopher"))) // Output: GOPHER -func ToUpperSpecial +
func ToUpperSpecial ¶
func ToUpperSpecial(c unicode.SpecialCase, s []byte) []byte@@ -805,7 +805,7 @@ ToUpperSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their upper case, giving priority to the special casing rules. -func Trim +
func Trim ¶
func Trim(s []byte, cutset string) []byte@@ -818,7 +818,7 @@ Example: fmt.Printf("[%q]", bytes.Trim([]byte(" !!! Achtung! Achtung! !!! "), "! ")) // Output: ["Achtung! Achtung"] -func TrimFunc +
func TrimFunc ¶
func TrimFunc(s []byte, f func(r rune) bool) []byte@@ -838,7 +838,7 @@ Example: // go-gopher // go-gopher! -func TrimLeft +
func TrimLeft ¶
func TrimLeft(s []byte, cutset string) []byte@@ -852,7 +852,7 @@ Example: // Output: // gopher8257 -func TrimLeftFunc +
func TrimLeftFunc ¶
func TrimLeftFunc(s []byte, f func(r rune) bool) []byte@@ -870,7 +870,7 @@ Example: // go-gopher! // go-gopher!567 -func TrimPrefix +
func TrimPrefix ¶
func TrimPrefix(s, prefix []byte) []byte@@ -886,7 +886,7 @@ Example: fmt.Printf("Hello%s", b) // Output: Hello, world! -func TrimRight +
func TrimRight ¶
func TrimRight(s []byte, cutset string) []byte@@ -900,7 +900,7 @@ Example: // Output: // 453gopher -func TrimRightFunc +
func TrimRightFunc ¶
func TrimRightFunc(s []byte, f func(r rune) bool) []byte@@ -918,7 +918,7 @@ Example: // go-gopher // 1234go-gopher! -func TrimSpace +
func TrimSpace ¶
func TrimSpace(s []byte) []byte@@ -931,7 +931,7 @@ Example: fmt.Printf("%s", bytes.TrimSpace([]byte(" \t\n a lone gopher \n\t\r\n"))) // Output: a lone gopher -func TrimSuffix +
func TrimSuffix ¶
func TrimSuffix(s, suffix []byte) []byte@@ -948,7 +948,7 @@ Example: os.Stdout.Write(b) // Output: Hello, world! -type Buffer +
type Buffer ¶
type Buffer struct { // contains filtered or unexported fields @@ -976,7 +976,7 @@ Example: io.Copy(os.Stdout, dec) // Output: Gophers rule! -func NewBuffer +
func NewBuffer ¶
func NewBuffer(buf []byte) *Buffer@@ -989,7 +989,7 @@ buf should have the desired capacity but a length of zero. In most cases, new(Buffer) (or just declaring a Buffer variable) is sufficient to initialize a Buffer. -func NewBufferString +
func NewBufferString ¶
func NewBufferString(s string) *Buffer@@ -999,7 +999,7 @@ initial contents. It is intended to prepare a buffer to read an existing string. In most cases, new(Buffer) (or just declaring a Buffer variable) is sufficient to initialize a Buffer. -func (*Buffer) Bytes +
func (*Buffer) Bytes ¶
func (b *Buffer) Bytes() []byte@@ -1010,14 +1010,14 @@ The slice aliases the buffer content at least until the next buffer modification, so immediate changes to the slice will affect the result of future reads. -func (*Buffer) Cap +
func (*Buffer) Cap ¶
func (b *Buffer) Cap() intCap returns the capacity of the buffer's underlying byte slice, that is, the total space allocated for the buffer's data. -func (*Buffer) Grow +
func (*Buffer) Grow ¶
func (b *Buffer) Grow(n int)@@ -1036,14 +1036,14 @@ Example: fmt.Printf("%q", bb[:b.Len()]) // Output: "64 bytes or fewer" -func (*Buffer) Len +
func (*Buffer) Len ¶
func (b *Buffer) Len() intLen returns the number of bytes of the unread portion of the buffer; b.Len() == len(b.Bytes()). -func (*Buffer) Next +
func (*Buffer) Next ¶
func (b *Buffer) Next(n int) []byte@@ -1052,7 +1052,7 @@ buffer as if the bytes had been returned by Read. If there are fewer than n bytes in the buffer, Next returns the entire buffer. The slice is only valid until the next call to a read or write method. -func (*Buffer) Read +
func (*Buffer) Read ¶
func (b *Buffer) Read(p []byte) (n int, err error)@@ -1060,14 +1060,14 @@ Read reads the next len(p) bytes from the buffer or until the buffer is drained. The return value n is the number of bytes read. If the buffer has no data to return, err is io.EOF (unless len(p) is zero); otherwise it is nil. -func (*Buffer) ReadByte +
func (*Buffer) ReadByte ¶
func (b *Buffer) ReadByte() (byte, error)ReadByte reads and returns the next byte from the buffer. If no byte is available, it returns error io.EOF. -func (*Buffer) ReadBytes +
func (*Buffer) ReadBytes ¶
func (b *Buffer) ReadBytes(delim byte) (line []byte, err error)@@ -1077,7 +1077,7 @@ encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadBytes returns err != nil if and only if the returned data does not end in delim. -func (*Buffer) ReadFrom +
func (*Buffer) ReadFrom ¶
func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error)@@ -1086,7 +1086,7 @@ buffer as needed. The return value n is the number of bytes read. Any error except io.EOF encountered during the read is also returned. If the buffer becomes too large, ReadFrom will panic with ErrTooLarge. -func (*Buffer) ReadRune +
func (*Buffer) ReadRune ¶
func (b *Buffer) ReadRune() (r rune, size int, err error)@@ -1094,7 +1094,7 @@ ReadRune reads and returns the next UTF-8-encoded Unicode code point from the buffer. If no bytes are available, the error returned is io.EOF. If the bytes are an erroneous UTF-8 encoding, it consumes one byte and returns U+FFFD, 1. -func (*Buffer) ReadString +
func (*Buffer) ReadString ¶
func (b *Buffer) ReadString(delim byte) (line string, err error)@@ -1104,14 +1104,14 @@ encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim. -func (*Buffer) Reset +
func (*Buffer) Reset ¶
func (b *Buffer) Reset()Reset resets the buffer to be empty, but it retains the underlying storage for use by future writes. Reset is the same as Truncate(0). -func (*Buffer) String +
func (*Buffer) String ¶
func (b *Buffer) String() string@@ -1120,7 +1120,7 @@ the Buffer is a nil pointer, it returns "". To build strings more efficiently, see the strings.Builder type. - func (*Buffer) Truncate +
func (*Buffer) Truncate ¶
func (b *Buffer) Truncate(n int)@@ -1128,7 +1128,7 @@ Truncate discards all but the first n unread bytes from the buffer but continues to use the same allocated storage. It panics if n is negative or greater than the length of the buffer. -func (*Buffer) UnreadByte +
func (*Buffer) UnreadByte ¶
func (b *Buffer) UnreadByte() error@@ -1137,7 +1137,7 @@ operation that read at least one byte. If a write has happened since the last read, if the last read returned an error, or if the read read zero bytes, UnreadByte returns an error. -func (*Buffer) UnreadRune +
func (*Buffer) UnreadRune ¶
func (b *Buffer) UnreadRune() error@@ -1146,7 +1146,7 @@ or write operation on the buffer was not a successful ReadRune, UnreadRune returns an error. (In this regard it is stricter than UnreadByte, which will unread the last byte from any read operation.) -func (*Buffer) Write +
func (*Buffer) Write ¶
func (b *Buffer) Write(p []byte) (n int, err error)@@ -1154,7 +1154,7 @@ Write appends the contents of p to the buffer, growing the buffer as needed. The return value n is the length of p; err is always nil. If the buffer becomes too large, Write will panic with ErrTooLarge. -func (*Buffer) WriteByte +
func (*Buffer) WriteByte ¶
func (b *Buffer) WriteByte(c byte) error@@ -1162,7 +1162,7 @@ WriteByte appends the byte c to the buffer, growing the buffer as needed. The returned error is always nil, but is included to match bufio.Writer's WriteByte. If the buffer becomes too large, WriteByte will panic with ErrTooLarge. -func (*Buffer) WriteRune +
func (*Buffer) WriteRune ¶
func (b *Buffer) WriteRune(r rune) (n int, err error)@@ -1171,7 +1171,7 @@ returning its length and an error, which is always nil but is included to match bufio.Writer's WriteRune. The buffer is grown as needed; if it becomes too large, WriteRune will panic with ErrTooLarge. -func (*Buffer) WriteString +
func (*Buffer) WriteString ¶
func (b *Buffer) WriteString(s string) (n int, err error)@@ -1179,7 +1179,7 @@ WriteString appends the contents of s to the buffer, growing the buffer as needed. The return value n is the length of s; err is always nil. If the buffer becomes too large, WriteString will panic with ErrTooLarge. -func (*Buffer) WriteTo +
func (*Buffer) WriteTo ¶
func (b *Buffer) WriteTo(w io.Writer) (n int64, err error)@@ -1188,7 +1188,7 @@ return value n is the number of bytes written; it always fits into an int, but it is int64 to match the io.WriterTo interface. Any error encountered during the write is also returned. -type Reader +
type Reader ¶
type Reader struct { // contains filtered or unexported fields @@ -1198,13 +1198,13 @@ A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker, io.ByteScanner, and io.RuneScanner interfaces by reading from a byte slice. Unlike a Buffer, a Reader is read-only and supports seeking. --func NewReader +
func NewReader ¶
func NewReader(b []byte) *ReaderNewReader returns a new Reader reading from b. -func (*Reader) Len +
func (*Reader) Len ¶
func (r *Reader) Len() int@@ -1219,43 +1219,43 @@ Example: // 3 // 16 -func (*Reader) Read +
func (*Reader) Read ¶
func (r *Reader) Read(b []byte) (n int, err error)Read implements the io.Reader interface. -func (*Reader) ReadAt +
func (*Reader) ReadAt ¶
func (r *Reader) ReadAt(b []byte, off int64) (n int, err error)ReadAt implements the io.ReaderAt interface. -func (*Reader) ReadByte +
func (*Reader) ReadByte ¶
func (r *Reader) ReadByte() (byte, error)ReadByte implements the io.ByteReader interface. -func (*Reader) ReadRune +
func (*Reader) ReadRune ¶
func (r *Reader) ReadRune() (ch rune, size int, err error)ReadRune implements the io.RuneReader interface. -func (*Reader) Reset +
func (*Reader) Reset ¶
func (r *Reader) Reset(b []byte)Reset resets the Reader to be reading from b. -func (*Reader) Seek +
func (*Reader) Seek ¶
func (r *Reader) Seek(offset int64, whence int) (int64, error)Seek implements the io.Seeker interface. -func (*Reader) Size +
func (*Reader) Size ¶
func (r *Reader) Size() int64@@ -1263,19 +1263,19 @@ Size returns the original length of the underlying byte slice. Size is the number of bytes available for reading via ReadAt. The returned value is always the same and is not affected by calls to any other method. -func (*Reader) UnreadByte +
func (*Reader) UnreadByte ¶
func (r *Reader) UnreadByte() errorUnreadByte complements ReadByte in implementing the io.ByteScanner interface. -func (*Reader) UnreadRune +
func (*Reader) UnreadRune ¶
func (r *Reader) UnreadRune() errorUnreadRune complements ReadRune in implementing the io.RuneScanner interface. -func (*Reader) WriteTo +
func (*Reader) WriteTo ¶
func (r *Reader) WriteTo(w io.Writer) (n int64, err error)@@ -1283,7 +1283,7 @@ WriteTo implements the io.WriterTo interface.Bugs
-- [☞](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/bytes/bytes.go#L520) The rule Title uses for word boundaries does not handle Unicode punctuation +- [☞](//github.com/golang/go/blob/release-branch.go1.10/src/bytes/bytes.go#L520) The rule Title uses for word boundaries does not handle Unicode punctuation properly. diff --git a/Source/compress/bzip2/bzip2.md b/Source/compress/bzip2/bzip2.md index 85f236e..a24eee9 100644 --- a/Source/compress/bzip2/bzip2.md +++ b/Source/compress/bzip2/bzip2.md @@ -14,9 +14,9 @@ Package bzip2 implements bzip2 decompression. - [func (s StructuralError) Error() string](#StructuralError.Error) ### Package files - [bit_reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/bzip2/bit_reader.go) [bzip2.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/bzip2/bzip2.go) [huffman.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/bzip2/huffman.go) [move_to_front.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/bzip2/move_to_front.go) + [bit_reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/bzip2/bit_reader.go) [bzip2.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/bzip2/bzip2.go) [huffman.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/bzip2/huffman.go) [move_to_front.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/bzip2/move_to_front.go) -func NewReader +
func NewReader ¶
func NewReader(r io.Reader) io.Reader@@ -24,14 +24,14 @@ NewReader returns an io.Reader which decompresses bzip2 data from r. If r does not also implement io.ByteReader, the decompressor may read more data than necessary from r. -type StructuralError +
type StructuralError ¶
type StructuralError stringA StructuralError is returned when the bzip2 data is found to be syntactically invalid. -func (StructuralError) Error +
func (StructuralError) Error ¶
func (s StructuralError) Error() stringdiff --git a/Source/compress/flate/flate.md b/Source/compress/flate/flate.md index e60f67f..33aca41 100644 --- a/Source/compress/flate/flate.md +++ b/Source/compress/flate/flate.md @@ -263,7 +263,7 @@ Example: - [Package (Synchronization)](#example_synchronization) ### Package files - [deflate.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/deflate.go) [deflatefast.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/deflatefast.go) [dict_decoder.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/dict_decoder.go) [huffman_bit_writer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/huffman_bit_writer.go) [huffman_code.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/huffman_code.go) [inflate.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/inflate.go) [token.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/flate/token.go) + [deflate.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/deflate.go) [deflatefast.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/deflatefast.go) [dict_decoder.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/dict_decoder.go) [huffman_bit_writer.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/huffman_bit_writer.go) [huffman_code.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/huffman_code.go) [inflate.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/inflate.go) [token.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/flate/token.go)Constants
@@ -286,7 +286,7 @@ Example: )func NewReader +
func NewReader ¶
func NewReader(r io.Reader) io.ReadCloser@@ -297,7 +297,7 @@ Close on the ReadCloser when finished reading. The ReadCloser returned by NewReader also implements Resetter. -func NewReaderDict +
func NewReaderDict ¶
func NewReaderDict(r io.Reader, dict []byte) io.ReadCloser@@ -308,29 +308,29 @@ typically used to read data compressed by NewWriterDict. The ReadCloser returned by NewReader also implements Resetter. -type CorruptInputError +
type CorruptInputError ¶
type CorruptInputError int64A CorruptInputError reports the presence of corrupt input at a given offset. -func (CorruptInputError) Error +
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string-type InternalError +
type InternalError ¶
type InternalError stringAn InternalError reports an error in the flate code itself. -func (InternalError) Error +
func (InternalError) Error ¶
func (e InternalError) Error() string-type ReadError +
type ReadError ¶
type ReadError struct { Offset int64 // byte offset where error occurred @@ -341,12 +341,12 @@ A ReadError reports an error encountered while reading input. Deprecated: No longer returned. -func (*ReadError) Error +
func (*ReadError) Error ¶
func (e *ReadError) Error() string-type Reader +
type Reader ¶
type Reader interface { io.Reader @@ -356,7 +356,7 @@ Deprecated: No longer returned. The actual read interface needed by NewReader. If the passed in io.Reader does not also have ReadByte, the NewReader will introduce its own buffering. -type Resetter +
type Resetter ¶
type Resetter interface { // Reset discards any buffered data and resets the Resetter as if it was @@ -368,7 +368,7 @@ Resetter resets a ReadCloser returned by NewReader or NewReaderDict to to switch to a new underlying Reader. This permits reusing a ReadCloser instead of allocating a new one. -type WriteError +
type WriteError ¶
type WriteError struct { Offset int64 // byte offset where error occurred @@ -379,12 +379,12 @@ A WriteError reports an error encountered while writing output. Deprecated: No longer returned. -func (*WriteError) Error +
func (*WriteError) Error ¶
func (e *WriteError) Error() string-type Writer +
type Writer ¶
type Writer struct { // contains filtered or unexported fields @@ -393,7 +393,7 @@ Deprecated: No longer returned. A Writer takes data written to it and writes the compressed form of that data to an underlying writer (see NewWriter). --func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer, level int) (*Writer, error)@@ -408,7 +408,7 @@ of input, but sacrificing considerable compression efficiency. If level is in the range [-2, 9] then the error returned will be nil. Otherwise the error returned will be non-nil. -func NewWriterDict +
func NewWriterDict ¶
func NewWriterDict(w io.Writer, level int, dict []byte) (*Writer, error)@@ -417,13 +417,13 @@ dictionary. The returned Writer behaves as if the dictionary had been written to it without producing any compressed output. The compressed data written to w can only be decompressed by a Reader initialized with the same dictionary. -func (*Writer) Close +
func (*Writer) Close ¶
func (w *Writer) Close() errorClose flushes and closes the writer. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (w *Writer) Flush() error@@ -436,14 +436,14 @@ Flush returns that error. In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH. -func (*Writer) Reset +
func (*Writer) Reset ¶
func (w *Writer) Reset(dst io.Writer)Reset discards the writer's state and makes it equivalent to the result of NewWriter or NewWriterDict called with dst and w's level and dictionary. -func (*Writer) Write +
func (*Writer) Write ¶
func (w *Writer) Write(data []byte) (n int, err error)diff --git a/Source/compress/gzip/gzip.md b/Source/compress/gzip/gzip.md index 62d5c74..e448882 100644 --- a/Source/compress/gzip/gzip.md +++ b/Source/compress/gzip/gzip.md @@ -75,7 +75,7 @@ Example: - [Package (WriterReader)](#example_writerReader) ### Package files - [gunzip.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/gzip/gunzip.go) [gzip.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/gzip/gzip.go) + [gunzip.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/gzip/gunzip.go) [gzip.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/gzip/gzip.go)Constants
@@ -100,7 +100,7 @@ These constants are copied from the flate package, so that code that imports )type Header +
type Header ¶
type Header struct { Comment string // comment @@ -116,7 +116,7 @@ header is exposed as the fields of the Writer and Reader structs. Strings must be UTF-8 encoded and may only contain Unicode code points U+0001 through U+00FF, due to limitations of the GZIP file format. -type Reader +
type Reader ¶
type Reader struct { Header // valid after NewReader or Reader.Reset @@ -136,7 +136,7 @@ does not have the expected length or checksum. Clients should treat data returned by Read as tentative until they receive the io.EOF marking the end of the data. -func NewReader +
func NewReader ¶
func NewReader(r io.Reader) (*Reader, error)@@ -148,7 +148,7 @@ It is the caller's responsibility to call Close on the Reader when done. The Reader.Header fields will be valid in the Reader returned. -func (*Reader) Close +
func (*Reader) Close ¶
func (z *Reader) Close() error@@ -156,7 +156,7 @@ Close closes the Reader. It does not close the underlying io.Reader. In order for the GZIP checksum to be verified, the reader must be fully consumed until the io.EOF. -func (*Reader) Multistream +
func (*Reader) Multistream ¶
func (z *Reader) Multistream(ok bool)@@ -249,14 +249,14 @@ Example: // // Hello Gophers - 2 -func (*Reader) Read +
func (*Reader) Read ¶
func (z *Reader) Read(p []byte) (n int, err error)Read implements io.Reader, reading uncompressed bytes from its underlying Reader. -func (*Reader) Reset +
func (*Reader) Reset ¶
func (z *Reader) Reset(r io.Reader) error@@ -264,7 +264,7 @@ Reset discards the Reader z's state and makes it equivalent to the result of its original state from NewReader, but reading from r instead. This permits reusing a Reader rather than allocating a new one. -type Writer +
type Writer ¶
type Writer struct { Header // written at first call to Write, Flush, or Close @@ -274,7 +274,7 @@ a Reader rather than allocating a new one. A Writer is an io.WriteCloser. Writes to a Writer are compressed and written to w. --func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer) *Writer@@ -287,7 +287,7 @@ Writes may be buffered and not flushed until Close. Callers that wish to set the fields in Writer.Header must do so before the first call to Write, Flush, or Close. -func NewWriterLevel +
func NewWriterLevel ¶
func NewWriterLevel(w io.Writer, level int) (*Writer, error)@@ -298,7 +298,7 @@ The compression level can be DefaultCompression, NoCompression, HuffmanOnly or any integer value between BestSpeed and BestCompression inclusive. The error returned will be nil if the level is valid. -func (*Writer) Close +
func (*Writer) Close ¶
func (z *Writer) Close() error@@ -306,7 +306,7 @@ Close closes the Writer by flushing any unwritten data to the underlying io.Writer and writing the GZIP footer. It does not close the underlying io.Writer. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (z *Writer) Flush() error@@ -319,7 +319,7 @@ that error. In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH. -func (*Writer) Reset +
func (*Writer) Reset ¶
func (z *Writer) Reset(w io.Writer)@@ -327,7 +327,7 @@ Reset discards the Writer z's state and makes it equivalent to the result of its original state from NewWriter or NewWriterLevel, but writing to w instead. This permits reusing a Writer rather than allocating a new one. -func (*Writer) Write +
func (*Writer) Write ¶
func (z *Writer) Write(p []byte) (int, error)diff --git a/Source/compress/lzw/lzw.md b/Source/compress/lzw/lzw.md index 933bea9..288388f 100644 --- a/Source/compress/lzw/lzw.md +++ b/Source/compress/lzw/lzw.md @@ -23,9 +23,9 @@ algorithm. See the golang.org/x/image/tiff/lzw package for an implementation. - [type Order](#Order) ### Package files - [reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/lzw/reader.go) [writer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/lzw/writer.go) + [reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/lzw/reader.go) [writer.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/lzw/writer.go) -func NewReader +
func NewReader ¶
func NewReader(r io.Reader, order Order, litWidth int) io.ReadCloser@@ -36,7 +36,7 @@ responsibility to call Close on the ReadCloser when finished reading. The number of bits to use for literal codes, litWidth, must be in the range [2,8] and is typically 8. It must equal the litWidth used during compression. -func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer, order Order, litWidth int) io.WriteCloser@@ -46,7 +46,7 @@ on the WriteCloser when finished writing. The number of bits to use for literal codes, litWidth, must be in the range [2,8] and is typically 8. Input bytes must be less than 1<type Order + type Order ¶
type Order intdiff --git a/Source/compress/zlib/zlib.md b/Source/compress/zlib/zlib.md index ea4397c..519763d 100644 --- a/Source/compress/zlib/zlib.md +++ b/Source/compress/zlib/zlib.md @@ -44,7 +44,7 @@ and to read that data back: - [NewWriter](#exampleNewWriter) ### Package files - [reader.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/zlib/reader.go) [writer.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/compress/zlib/writer.go) + [reader.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/zlib/reader.go) [writer.go](//github.com/golang/go/blob/release-branch.go1.10/src/compress/zlib/writer.go)Constants
@@ -71,7 +71,7 @@ These constants are copied from the flate package, so that code that imports )func NewReader +
func NewReader ¶
func NewReader(r io.Reader) (io.ReadCloser, error)@@ -97,7 +97,7 @@ Example: // Output: hello, world r.Close() -func NewReaderDict +
func NewReaderDict ¶
func NewReaderDict(r io.Reader, dict []byte) (io.ReadCloser, error)@@ -108,7 +108,7 @@ ErrDictionary. The ReadCloser returned by NewReaderDict also implements Resetter. -type Resetter +
type Resetter ¶
type Resetter interface { // Reset discards any buffered data and resets the Resetter as if it was @@ -120,7 +120,7 @@ Resetter resets a ReadCloser returned by NewReader or NewReaderDict to to switch to a new underlying Reader. This permits reusing a ReadCloser instead of allocating a new one. -type Writer +
type Writer ¶
type Writer struct { // contains filtered or unexported fields @@ -129,7 +129,7 @@ allocating a new one. A Writer takes data written to it and writes the compressed form of that data to an underlying writer (see NewWriter). -func NewWriter +
func NewWriter ¶
func NewWriter(w io.Writer) *Writer@@ -150,7 +150,7 @@ Example: fmt.Println(b.Bytes()) // Output: [120 156 202 72 205 201 201 215 81 40 207 47 202 73 225 2 4 0 0 255 255 33 231 4 147] -func NewWriterLevel +
func NewWriterLevel ¶
func NewWriterLevel(w io.Writer, level int) (*Writer, error)@@ -161,7 +161,7 @@ The compression level can be DefaultCompression, NoCompression, HuffmanOnly or any integer value between BestSpeed and BestCompression inclusive. The error returned will be nil if the level is valid. -func NewWriterLevelDict +
func NewWriterLevelDict ¶
func NewWriterLevelDict(w io.Writer, level int, dict []byte) (*Writer, error)@@ -171,27 +171,27 @@ with. The dictionary may be nil. If not, its contents should not be modified until the Writer is closed. -func (*Writer) Close +
func (*Writer) Close ¶
func (z *Writer) Close() errorClose closes the Writer, flushing any unwritten data to the underlying io.Writer, but does not close the underlying io.Writer. -func (*Writer) Flush +
func (*Writer) Flush ¶
func (z *Writer) Flush() errorFlush flushes the Writer to its underlying io.Writer. -func (*Writer) Reset +
func (*Writer) Reset ¶
func (z *Writer) Reset(w io.Writer)Reset clears the state of the Writer z such that it is equivalent to its initial state from NewWriterLevel or NewWriterLevelDict, but instead writing to w. -func (*Writer) Write +
func (*Writer) Write ¶
func (z *Writer) Write(p []byte) (n int, err error)diff --git a/Source/container/heap/heap.md b/Source/container/heap/heap.md index 3bb12fe..6713a01 100644 --- a/Source/container/heap/heap.md +++ b/Source/container/heap/heap.md @@ -177,9 +177,9 @@ Example: - [Package (PriorityQueue)](#example_priorityQueue) ### Package files - [heap.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/container/heap/heap.go) + [heap.go](//github.com/golang/go/blob/release-branch.go1.10/src/container/heap/heap.go) -func Fix +
func Fix ¶
func Fix(h Interface, i int)@@ -188,7 +188,7 @@ its value. Changing the value of the element at index i and then calling Fix is equivalent to, but less expensive than, calling Remove(h, i) followed by a Push of the new value. The complexity is O(log(n)) where n = h.Len(). -func Init +
func Init ¶
func Init(h Interface)@@ -197,7 +197,7 @@ is idempotent with respect to the heap invariants and may be called whenever the heap invariants may have been invalidated. Its complexity is O(n) where n = h.Len(). -func Pop +
func Pop ¶
func Pop(h Interface) interface{}@@ -205,21 +205,21 @@ Pop removes the minimum element (according to Less) from the heap and returns it. The complexity is O(log(n)) where n = h.Len(). It is equivalent to Remove(h, 0). -func Push +
func Push ¶
func Push(h Interface, x interface{})Push pushes the element x onto the heap. The complexity is O(log(n)) where n = h.Len(). -func Remove +
func Remove ¶
func Remove(h Interface, i int) interface{}Remove removes the element at index i from the heap. The complexity is O(log(n)) where n = h.Len(). -type Interface +
type Interface ¶
type Interface interface { sort.Interface diff --git a/Source/container/list/list.md b/Source/container/list/list.md index de1e73c..5f16efb 100644 --- a/Source/container/list/list.md +++ b/Source/container/list/list.md @@ -62,9 +62,9 @@ Example: - [Package](#example) ### Package files - [list.go](//github.com/golang/go/blob/2ea7d3461bb41d0ae12b56ee52d43314bcdb97f9/src/container/list/list.go) + [list.go](//github.com/golang/go/blob/release-branch.go1.10/src/container/list/list.go) -type