code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package suffixarray implements substring search in logarithmic time using // an in-memory suffix array. // // Example use: // // // create index for some dat...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This algorithm is based on "Faster Suffix Sorting" // by N. Jesper Larsson and Kunihiko Sadakane // paper: http://www.larsson.dogma.net/ssrev-tr.pdf // cod...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package unsafe contains operations that step around the type safety of Go programs. */ package unsafe // ArbitraryType is here for the purposes of document...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package quick implements utility functions to help with black box testing. package quick import ( "flag" "fmt" "math" "math/rand" "reflect" "strings" ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package testing import ( "bytes" "fmt" "io" "os" "strings" "time" ) type InternalExample struct { Name string F func() Output string } func R...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package iotest import "io" // TruncateWriter returns a Writer that writes to w // but stops silently after n bytes. func TruncateWriter(w io.Writer, n int64) ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package iotest implements Readers and Writers useful mainly for testing. package iotest import ( "errors" "io" ) // OneByteReader returns a Reader that i...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package iotest import ( "io" "log" ) type writeLogger struct { prefix string w io.Writer } func (l *writeLogger) Write(p []byte) (n int, err error) ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package testing provides support for automated testing of Go packages. // It is intended to be used in concert with the ``go test'' command, which automates ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package testing import ( "flag" "fmt" "os" "runtime" "time" ) var matchBenchmarks = flag.String("test.bench", "", "regular expression to select benchmark...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package collate contains types for comparing and sorting Unicode strings // according to a given collation order. Package locale provides a high-level // in...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package collate import ( "exp/norm" "unicode/utf8" ) // table holds all collation data for a given collation ordering. type table struct { index trie // ma...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package collate import "unicode/utf8" // For a description of contractTrieSet, see exp/locale/collate/build/contract.go. type contractTrieSet []struct{ l, h,...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package collate import "exp/norm" // Init is used by type Builder in exp/locale/collate/build/ // to create Collator instances. It is for internal use only. ...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package collate import ( "unicode" ) // weights holds the decoded weights per collation level. type weights struct { primary uint32 secondary uint16 ter...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The trie in this file is used to associate the first full character // in an UTF-8 string to a collation element. // All but the last byte in a UTF-8 byte se...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "archive/zip" "bufio" "bytes" "exp/locale/collate" "flag" "fmt" "io" "io/ioutil" "log" "net/http" "os" "pat...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Collation table generator. // Data read from the web. package main import ( "bufio" "exp/locale/collate" "exp/locale/collate/build" "...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "errors" "exp/types" "flag" "fmt" "go/ast" "go/parser" "go/scanner" "go/token" "io/ioutil" "os" "path/filepath" "strings" ) ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* The gotype command does syntactic and semantic analysis of Go files and packages similar to the analysis performed by the front-end of a Go compiler. Errors ...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package inotify implements a wrapper for the Linux inotify system. Example: watcher, err := inotify.NewWatcher() if err != nil { log.Fatal(e...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html // All entities that do not end with ';' are 6 or fewer bytes long. const longestEntityWithoutSemicolon = 6 // entity is a map from HTML entity n...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package atom provides integer codes (also known as atoms) for a fixed set of // frequently occurring HTML strings: tag names and attribute keys such as "p" /...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main // This program generates table.go and table_test.go. // Invoke as // // go run gen.go |gofmt >table.go // go run gen.go -test |...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "bytes" "strings" "unicode/utf8" ) // These replacements permit compatibility with old numeric entities that // assumed Windows-1252...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "bytes" "exp/html/atom" "io" "strconv" "strings" ) // A TokenType is the type of a Token. type TokenType uint32 const ( // ErrorT...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "bufio" "errors" "fmt" "io" "strings" ) type writer interface { io.Writer WriteByte(byte) error WriteString(string) (int, error)...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "errors" a "exp/html/atom" "fmt" "io" "strings" ) // A parser implements the HTML5 parsing algorithm: // http://www.whatwg.org/spec...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html // Section 12.2.3.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". // http://www.whatwg...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "strings" ) func adjustAttributeNames(aa []Attribute, nameMap map[string]string) { for i := range aa { if newName, ok := nameMap[aa[...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "exp/html/atom" ) // A NodeType is the type of a Node. type NodeType uint32 const ( ErrorNode NodeType = iota TextNode DocumentNode...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package html import ( "strings" ) // parseDoctype parses the data from a DoctypeToken into a name, // public identifier, and system identifier. It returns a ...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package html implements an HTML5-compliant tokenizer and parser. INCOMPLETE. Tokenization is done by creating a Tokenizer for an io.Reader r. It is the call...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "bytes" "exp/ebnf" "flag" "fmt" "go/scanner" "go/token" "io" "io/ioutil" "os" "path/filepath" ) var fset = token.NewFileSet() ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Ebnflint verifies that EBNF productions are consistent and grammatically correct. It reads them from an HTML document such as the Go specification. Grammar...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ebnf import ( "io" "strconv" "text/scanner" ) type parser struct { errors errorList scanner scanner.Scanner pos scanner.Position // token p...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package ebnf is a library for EBNF grammars. The input is text ([]byte) // satisfying the following grammar (represented itself in EBNF): // // Production =...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm import "io" type normWriter struct { rb reorderBuffer w io.Writer buf []byte } // Write implements the standard write interface. If the l...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm // This file contains Form-specific logic and wrappers for data in tables.go. // Rune info is stored in a separate trie per composing form. A com...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Trie table generator. // Used by make*tables tools to generate a go file with trie data structures // for mapping UTF-8 to a 16-bit value. ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm const MaxSegmentSize = maxByteBufferSize // An Iter iterates over a string or byte slice, while normalizing it // to a given Form. type Iter stru...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm import "unicode/utf8" const ( maxCombiningChars = 30 maxBufferSize = maxCombiningChars + 2 // +1 to hold starter +1 to hold CGJ maxBackRun...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "bufio" "bytes" "exp/norm" "flag" "fmt" "io" "log" "net/http" "os" "path" "regexp" "runtime" "strconv" "s...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm type valueRange struct { value uint16 // header: value:stride lo, hi byte // header: lo:n } type trie struct { index []uint8 values...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm import "unicode/utf8" type input interface { skipASCII(p, max int) int skipNonStarter(p int) int appendSlice(buf []byte, s, e int) []byte cop...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Generate test data for trie code. package main import ( "fmt" ) func main() { printTestTables() } // We take the smallest, largest an...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package norm contains types and functions for normalizing Unicode strings. package norm import "unicode/utf8" // A Form denotes a canonical representation ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Normalization table generator. // Data read from the web. // See forminfo.go for a description of the trie values associated with each rune...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package utf8string provides an efficient way to index strings by rune rather than by byte. package utf8string import ( "errors" "unicode/utf8" ) // Strin...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements the Check function, which typechecks a package. package types import ( "fmt" "go/ast" "go/scanner" "go/token" "strconv" ) const ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package types declares the types used to represent Go types // (UNDER CONSTRUCTION). ANY AND ALL PARTS MAY CHANGE. // package types import ( "bytes" "fmt"...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // FILE UNDER CONSTRUCTION. ANY AND ALL PARTS MAY CHANGE. // This file implements the universe and unsafe package scopes. package types import "go/ast" var (...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements FindGcExportData. package types import ( "bufio" "errors" "fmt" "io" "strconv" "strings" ) func readGopackHeader(r *bufio.Reade...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements an ast.Importer for gc-generated object files. // TODO(gri) Eventually move this into a separate package outside types. package types ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements operations on ideal constants. package types import ( "go/token" "math/big" "strconv" ) // TODO(gri) Consider changing the API so ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build windows // Package winfsnotify allows the user to receive // file system event notifications on Windows. package winfsnotify import ( "errors" "fm...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package builtin provides documentation for Go's predeclared identifiers. The items documented here are not actually in package builtin but their descripti...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package zlib import ( "compress/flate" "fmt" "hash" "hash/adler32" "io" ) // These constants are copied from the flate package, so that code that imports...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package zlib implements reading and writing of zlib format compressed data, as specified in RFC 1950. The implementation provides filters that uncompress du...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate var reverseByte = [256]byte{ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48,...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate const ( // 2 bits: type 0 = literal 1=EOF 2=Match 3=Unused // 8 bits: xlength = length - MIN_MATCH_LENGTH // 22 bits xoffset = off...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package flate implements the DEFLATE compressed data format, described in // RFC 1951. The gzip and zlib packages implement access to DEFLATE-based file // ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate import ( "io" "math" ) const ( // The largest offset code. offsetCodeCount = 30 // The special code used to mark the end of a block. endB...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate import ( "fmt" "io" "math" ) const ( NoCompression = 0 BestSpeed = 1 fastCompression = 3 BestCompression = 9 Default...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate // forwardCopy is like the built-in copy function except that it always goes // forward from the start, even if the dst and src overlap. func for...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package flate import ( "math" "sort" ) type huffmanEncoder struct { codeBits []uint8 code []uint16 } type literalNode struct { literal uint16 freq ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bzip2 import ( "bufio" "io" ) // bitReader wraps an io.Reader and provides the ability to read values, // bit-by-bit, from it. Its Read* methods don...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bzip2 import "sort" // A huffmanTree is a binary tree which is navigated, bit-by-bit to reach a // symbol. type huffmanTree struct { // nodes contain...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package bzip2 implements bzip2 decompression. package bzip2 import "io" // There's no RFC for bzip2. I used the Wikipedia page for reference and a lot // o...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bzip2 // moveToFrontDecoder implements a move-to-front list. Such a list is an // efficient way to transform a string with repeating elements into one ...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package gzip import ( "compress/flate" "errors" "fmt" "hash" "hash/crc32" "io" ) // These constants are copied from the flate package, so that code that...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package gzip implements reading and writing of gzip format compressed files, // as specified in RFC 1952. package gzip import ( "bufio" "compress/flate" ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package lzw import ( "bufio" "errors" "fmt" "io" ) // A writer is a buffered, flushable writer. type writer interface { WriteByte(byte) error Flush() er...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package lzw implements the Lempel-Ziv-Welch compressed data format, // described in T. A. Welch, ``A Technique for High-Performance Data // Compression'', Co...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fmt import ( "errors" "io" "os" "reflect" "sync" "unicode/utf8" ) // Some constants in the form of bytes, to avoid string overhead. // Needlessl...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fmt import ( "errors" "io" "math" "os" "reflect" "strconv" "unicode/utf8" ) // runeUnreader is the interface to something that can unread runes...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fmt import ( "strconv" "unicode/utf8" ) const ( nByte = 65 // %b of an int64, plus a sign. ldigits = "0123456789abcdef" udigits = "0123456789ABC...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* Package fmt implements formatted I/O with functions analogous to C's printf and scanf. The format 'verbs' are derived from C's but are simpler. Printi...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package log implements a simple logging package. It defines a type, Logger, // with methods for formatting output. It also has a predefined 'standard' // Log...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !windows,!plan9 // Package syslog provides a simple interface to the system log service. It // can send messages to the syslog daemon using UNIX doma...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !windows,!plan9 package syslog import ( "errors" "net" ) // unixSyslog opens a connection to the syslog daemon running on the // local machine us...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package syslog provides a simple interface to the system log service. package syslog // BUG(brainman): This package is not implemented on Windows yet.
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes import ( "errors" "io" "unicode/utf8" ) // A Reader implements the io.Reader, io.ReaderAt, io.Seeker, // io.ByteScanner, and io.RuneScanner i...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package bytes implements functions for the manipulation of byte slices. // It is analogous to the facilities of the strings package. package bytes import ( ...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes // Simple byte buffer for marshaling data. import ( "errors" "io" "unicode/utf8" ) // A Buffer is a variable-sized buffer of bytes with Read...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes // IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s. func IndexByte(s []byte, c byte) int // asm_$GOA...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package fnv implements FNV-1 and FNV-1a, non-cryptographic hash functions // created by Glenn Fowler, Landon Curt Noll, and Phong Vo. // See http://isthe.com...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package adler32 implements the Adler-32 checksum. // // It is defined in RFC 1950: // Adler-32 is composed of two sums accumulated per byte: s1 is // the sum...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package crc64 implements the 64-bit cyclic redundancy check, or CRC-64, // checksum. See http://en.wikipedia.org/wiki/Cyclic_redundancy_check for // informat...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package hash provides interfaces for hash functions. package hash import "io" // Hash is the common interface implemented by all hash functions. type Hash ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package crc32 // This file contains the code to call the SSE 4.2 version of the Castagnoli // CRC. // haveSSE42 is defined in crc_amd64.s and uses CPUID to te...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build 386 arm package crc32 // The file contains the generic version of updateCastagnoli which just calls // the software implementation. func updateCast...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32, // checksum. See http://en.wikipedia.org/wiki/Cyclic_redundancy_check for // informat...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package scanner import ( "fmt" "go/token" "io" "sort" ) // In an ErrorList, an error is represented by an *Error. // The position Pos, if valid, points to...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package scanner implements a scanner for Go source text. // It takes a []byte as source which can then be tokenized // through repeated calls to the Scan met...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package parser implements a parser for Go source files. Input may be // provided in a variety of forms (see the various Parse* functions); the // output is a...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file contains the exported entry points for invoking the parser. package parser import ( "bytes" "errors" "go/ast" "go/token" "io" "io/ioutil" ...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements export filtering of an AST. package doc import "go/ast" // filterIdentList removes unexported names from list in place // and returns...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Godoc comment extraction and comment -> HTML formatting. package doc import ( "io" "regexp" "strings" "text/template" // for HTMLEscape "unicode" "un...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore /* The headscan command extracts comment headings from package files; it is used to detect false positives which may require an adjustment ...
Go