code
stringlengths
10
1.34M
language
stringclasses
1 value
// 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 doc import ( "go/ast" "go/token" "regexp" "sort" "strconv" ) // ---------------------------------------------------------------------------- // f...
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. // Extract example functions from file ASTs. package doc import ( "go/ast" "go/token" "regexp" "sort" "strings" "unicode" "unicode/utf8" ) type Exampl...
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 doc import "go/ast" type Filter func(string) bool func matchFields(fields *ast.FieldList, f Filter) bool { if fields != nil { for _, field := rang...
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 doc extracts source code documentation from a Go AST. package doc import ( "go/ast" "go/token" ) // Package is the documentation for an entire pa...
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 doc import ( "strings" "unicode" ) // firstSentenceLen returns the length of the first sentence in s. // The sentence ends after the first period fo...
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 token defines constants representing the lexical tokens of the Go // programming language and basic operations on tokens (printing, predicates). // p...
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 token type serializedFile struct { // fields correspond 1:1 to fields with same (lower-case) name in File Name string Base int Size int Lines [...
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. // TODO(gri) consider making this a separate package outside the go directory. package token import ( "fmt" "sort" "sync" ) // ---------------------------...
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 ast declares the types used to represent syntax trees for Go // packages. // package ast import ( "go/token" "strings" "unicode" "unicode/utf8" ...
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. // This file contains printing support for ASTs. package ast import ( "fmt" "go/token" "io" "os" "reflect" ) // A FieldFilter may be provided to Fprint ...
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 NewPackage. package ast import ( "fmt" "go/scanner" "go/token" "strconv" ) type pkgBuilder struct { fset *token.FileSet error...
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 ast import ( "go/token" "sort" "strconv" ) // SortImports sorts runs of consecutive import lines in import blocks in f. func SortImports(fset *toke...
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 ast import ( "go/token" "sort" ) // ---------------------------------------------------------------------------- // Export filtering // exportFilte...
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 ast import ( "bytes" "fmt" "go/token" "sort" ) type byPos []*CommentGroup func (a byPos) Len() int { return len(a) } func (a byPos) Les...
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 ast import "fmt" // A Visitor's Visit method is invoked for each node encountered by Walk. // If the result visitor w is not nil, Walk visits each of ...
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 implements scopes and the objects they contain. package ast import ( "bytes" "fmt" "go/token" ) // A Scope maintains the set of named languag...
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 printer implements printing of AST nodes. package printer import ( "fmt" "go/ast" "go/token" "io" "os" "strconv" "strings" "text/tabwriter" ...
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 implements printing of AST nodes; specifically // expressions, statements, declarations, and files. It uses // the print functionality implemented ...
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. // Counter (CTR) mode. // CTR converts a block cipher into a stream cipher by // repeatedly encrypting an incrementing counter and // xoring the resulting stre...
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 cipher implements standard block cipher modes that can be wrapped // around low-level block cipher implementations. // See http://csrc.nist.gov/group...
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. // OFB (Output Feedback) Mode. package cipher type ofb struct { b Block out []byte outUsed int } // NewOFB returns a Stream that encrypts or dec...
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 cipher import "io" // The Stream* objects are so simple that all their members are public. Users // can create them themselves. // StreamReader wraps...
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. // CFB (Cipher Feedback) Mode. package cipher type cfb struct { b Block out []byte outUsed int decrypt bool } // NewCFBEncrypter returns a Stre...
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. // Cipher block chaining (CBC) mode. // CBC provides confidentiality by xoring (chaining) each plaintext block // with the previous ciphertext block before app...
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 subtle implements functions that are often useful in cryptographic // code but require careful thought to use correctly. package subtle // ConstantT...
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 Go implementation is derived in part from the reference // ANSI C implementation, which carries the following notice: // // rijndael-alg-fst.c // // @ve...
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 aes import ( "crypto/cipher" "strconv" ) // The AES block size in bytes. const BlockSize = 16 // A cipher is an instance of AES encryption using 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. // Package aes implements AES encryption (formerly Rijndael), as defined in // U.S. Federal Information Processing Standards Publication 197. package aes // Th...
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 elliptic // This is a constant-time, 32-bit implementation of P224. See FIPS 186-3, // section D.2.2. // // See http://www.imperialviolet.org/2010/12/...
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 elliptic implements several standard elliptic curves over prime // fields. package elliptic // This package operates, internally, on Jacobian coordi...
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 dsa implements the Digital Signature Algorithm, as defined in FIPS 186-3. package dsa import ( "errors" "io" "math/big" ) // Parameters represen...
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. // SHA256 block step. // In its own file so that a faster assembly or C version // can be substituted easily. package sha256 var _K = []uint32{ 0x428a2f98, ...
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 sha256 implements the SHA224 and SHA256 hash algorithms as defined // in FIPS 180-2. package sha256 import ( "crypto" "hash" ) func init() { cry...
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. // TLS low level connection and record layer package tls import ( "bytes" "crypto/cipher" "crypto/subtle" "crypto/x509" "errors" "io" "net" "sync" "t...
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 tls import ( "crypto" "crypto/rand" "crypto/x509" "io" "strings" "sync" "time" ) const ( maxPlaintext = 16384 // maximum plaintext 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 tls import "strconv" type alert uint8 const ( // alert level alertLevelWarning = 1 alertLevelError = 2 ) const ( alertCloseNotify 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 tls import ( "crypto" "crypto/elliptic" "crypto/md5" "crypto/rsa" "crypto/sha1" "crypto/x509" "errors" "io" "math/big" ) // rsaKeyAgreement i...
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 tls import ( "crypto/aes" "crypto/cipher" "crypto/des" "crypto/hmac" "crypto/rc4" "crypto/sha1" "crypto/x509" "hash" ) // a keyAgreement imple...
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 tls partially implements TLS 1.0, as specified in RFC 2246. package tls import ( "crypto/rsa" "crypto/x509" "encoding/pem" "errors" "io/ioutil"...
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 tls import ( "crypto/hmac" "crypto/md5" "crypto/sha1" "hash" ) // Split a premaster secret in two as specified in RFC 4346, section 5. func splitP...
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 ignore // Generate a self-signed X.509 certificate for a TLS server. Outputs to // 'cert.pem' and 'key.pem' and will overwrite existing files. packa...
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 tls import "bytes" type clientHelloMsg struct { raw []byte vers uint16 random []byte sessionId [...
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 tls import ( "crypto" "crypto/rsa" "crypto/subtle" "crypto/x509" "errors" "io" ) func (c *Conn) serverHandshake() error { config := c.config m...
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 tls import ( "bytes" "crypto" "crypto/rsa" "crypto/subtle" "crypto/x509" "errors" "io" "strconv" ) func (c *Conn) clientHandshake() error { f...
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 hmac implements the Keyed-Hash Message Authentication Code (HMAC) as // defined in U.S. Federal Information Processing Standards Publication 198. // ...
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 ecdsa implements the Elliptic Curve Digital Signature Algorithm, as // defined in FIPS 186-3. package ecdsa // References: // [NSA]: Suite B imple...
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 rc4 implements RC4 encryption, as defined in Bruce Schneier's // Applied Cryptography. package rc4 // BUG(agl): RC4 is in common use but has design ...
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 des import ( "encoding/binary" ) func cryptBlock(subkeys []uint64, dst, src []byte, decrypt bool) { b := binary.BigEndian.Uint64(src) b = permuteBl...
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 des import ( "crypto/cipher" "strconv" ) // The DES block size in bytes. const BlockSize = 8 type KeySizeError int func (k KeySizeError) Error() s...
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 des implements the Data Encryption Standard (DES) and the // Triple Data Encryption Algorithm (TDEA) as defined // in U.S. Federal Information Proces...
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 crypto collects common cryptographic constants. package crypto import ( "hash" ) // Hash identifies a cryptographic hash function that is implemen...
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 sha512 implements the SHA384 and SHA512 hash algorithms as defined // in FIPS 180-2. package sha512 import ( "crypto" "hash" ) func init() { cry...
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. // SHA512 block step. // In its own file so that a faster assembly or C version // can be substituted easily. package sha512 var _K = []uint64{ 0x428a2f98d72...
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 rand import ( "errors" "io" "math/big" ) // Prime returns a number, p, of the given size, such that p is prime // with high probability. func Prim...
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 rand implements a cryptographically secure // pseudorandom number generator. package rand import "io" // Reader is a global, shared instance of 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. // Windows cryptographically secure pseudorandom number // generator. package rand import ( "os" "sync" "syscall" ) // Implemented by using Windows Crypt...
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. // +build darwin freebsd linux netbsd openbsd plan9 // Unix cryptographically secure pseudorandom number // generator. package rand import ( "bufio" "cryp...
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 sha1 implements the SHA1 hash algorithm as defined in RFC 3174. package sha1 import ( "crypto" "hash" ) func init() { crypto.RegisterHash(crypto...
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. // SHA1 block step. // In its own file so that a faster assembly or C version // can be substituted easily. package sha1 const ( _K0 = 0x5A827999 _K1 = 0x6E...
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 rsa implements RSA encryption as specified in PKCS#1. package rsa // TODO(agl): Add support for PSS padding. import ( "crypto/rand" "crypto/subtl...
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 rsa import ( "crypto" "crypto/subtle" "errors" "io" "math/big" ) // This file implements encryption and decryption using PKCS#1 v1.5 padding. //...
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 x509 /* #cgo CFLAGS: -mmacosx-version-min=10.6 -D__MAC_OS_X_VERSION_MAX_ALLOWED=1060 #cgo LDFLAGS: -framework CoreFoundation -framework Security #incl...
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 x509 import ( "crypto/x509/pkix" "encoding/asn1" "errors" "fmt" ) // pkcs8 reflects an ASN.1, PKCS#8 PrivateKey. See // ftp://ftp.rsasecurity.com...
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 x509 import ( "errors" "syscall" "unsafe" ) // Creates a new *syscall.CertContext representing the leaf certificate in an in-memory // certificate ...
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 x509 parses X.509-encoded keys and certificates. package x509 import ( "bytes" "crypto" "crypto/dsa" "crypto/ecdsa" "crypto/elliptic" "crypto/...
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 plan9 darwin,!cgo package x509 func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) { return nil, nil } fu...
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 freebsd linux openbsd netbsd package x509 import "io/ioutil" // Possible certificate files; stop after finding one. var certFiles = []string{ "/et...
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 x509 import ( "runtime" "strings" "time" "unicode/utf8" ) type InvalidReason int const ( // NotAuthorizedToSign results when a certificate is si...
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 pkix contains shared, low level structures used for ASN.1 parsing // and serialization of X.509 certificates, CRL and OCSP. package pkix import ( "...
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 x509 import ( "crypto/rsa" "encoding/asn1" "errors" "math/big" ) // pkcs1PrivateKey is a structure which mirrors the PKCS#1 ASN.1 for an RSA priva...
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 x509 import "sync" var ( once sync.Once systemRoots *CertPool ) func systemRootsPool() *CertPool { once.Do(initSystemRoots) return systemR...
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 x509 import ( "encoding/pem" ) // CertPool is a set of certificates. type CertPool struct { bySubjectKeyId map[string][]int byName map[stri...
Go
package md5 import ( "runtime" "unsafe" ) func block(dig *digest, p []byte) { a := dig.s[0] b := dig.s[1] c := dig.s[2] d := dig.s[3] var X *[16]uint32 var xbuf [16]uint32 for len(p) >= chunk { aa, bb, cc, dd := a, b, c, d // This is a constant condition - it is not evaluated on each iteration. if run...
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 // This program generates md5block.go // Invoke as // // go run gen.go [-full] |gofmt >md5block.go // // The -full flag causes the generated ...
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 md5 implements the MD5 hash algorithm as defined in RFC 1321. package md5 import ( "crypto" "hash" ) func init() { crypto.RegisterHash(crypto.MD...
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 bufio implements buffered I/O. It wraps an io.Reader or io.Writer // object, creating another object (Reader or Writer) that also implements // the ...
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 ioutil implements some I/O utility functions. package ioutil import ( "bytes" "io" "os" "sort" ) // readAll reads from r until an error or EOF ...
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 ioutil import ( "os" "path/filepath" "strconv" "time" ) // Random number state, accessed without lock; racy but harmless. // We generate random t...
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 io provides basic interfaces to I/O primitives. // Its primary job is to wrap existing implementations of such primitives, // such as those in packag...
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. // Pipe adapter to connect code expecting an io.Reader // with code expecting an io.Writer. package io import ( "errors" "sync" ) // ErrClosedPipe is the 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 io type multiReader struct { readers []Reader } func (mr *multiReader) Read(p []byte) (n int, err error) { for len(mr.readers) > 0 { n, err = mr.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. /* Ld is the portable code for a modified version of the Plan 9 linker. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2l It rea...
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. /* 5a is a version of the Plan 9 assembler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2a Its target architecture is the ARM...
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. // Parse input AST and prepare Prog structure. package main import ( "fmt" "go/ast" "go/parser" "go/scanner" "go/token" "os" "strings" ) func parse(n...
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. // Cgo; see gmp.go for an overview. // TODO(rsc): // Emit correct line number annotations. // Make 6g understand the annotations. package main import ( "cr...
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 ( "fmt" "go/token" "io/ioutil" "os" "os/exec" ) // run runs the command argv, feeding in stdin on standard input. // It returns the ...
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" "debug/elf" "debug/macho" "debug/pe" "fmt" "go/ast" "go/printer" "go/token" "os" "sort" "strings" ) var conf = print...
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. /* Cgo enables the creation of Go packages that call C code. Usage: go tool cgo [compiler options] file.go The compiler options are passed through uninterp...
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. // Annotate Ref in Prog with C types by parsing gcc debug output. // Conversion of debug output to Go types. package main import ( "bytes" "debug/dwarf" "...
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. /* 8g is the version of the gc compiler for the x86. The $GOARCH for these tools is 386. It reads .go files and outputs .8 files. The flags are documented in ...
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 ( "go/ast" ) func init() { register(httpHeadersFix) } var httpHeadersFix = fix{ "httpheaders", "2011-06-16", httpheaders, `Rename ...
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 ( "go/ast" "strings" ) func init() { register(signalFix) } var signalFix = fix{ "signal", "2011-06-29", signal, `Adapt code to ty...
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 ( "go/ast" ) func init() { register(imagecolorFix) } var imagecolorFix = fix{ "imagecolor", "2011-10-04", imagecolor, `Adapt code ...
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 ( "go/ast" ) func init() { register(hashSumFix) } var hashSumFix = fix{ "hashsum", "2011-11-30", hashSumFn, `Pass a nil argument t...
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 ( "go/ast" ) func init() { register(imageycbcrFix) } var imageycbcrFix = fix{ "imageycbcr", "2011-12-20", imageycbcr, `Adapt code ...
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 "go/ast" func init() { register(urlFix) } var urlFix = fix{ "url", "2011-08-17", url, `Move the URL pieces of package http into a n...
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 "go/ast" func init() { register(strconvFix) } var strconvFix = fix{ "strconv", "2011-12-01", strconvFn, `Convert to new strconv API...
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 ( "bytes" "flag" "fmt" "go/ast" "go/parser" "go/printer" "go/scanner" "go/token" "io/ioutil" "os" "os/exec" "path/filepath" "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 main import ( "go/ast" "go/token" ) func init() { register(procattrFix) } var procattrFix = fix{ "procattr", "2011-03-15", procattr, `Adapt c...
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 ( "go/ast" ) func init() { register(templateFix) } var templateFix = fix{ "template", "2011-11-22", template, `Rewrite calls to te...
Go