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. // SRPC server package srpc import ( "bytes"; "log"; "os"; "syscall"; ) // TODO(rsc): I'd prefer to make this // type Handler func(m *msg) Errno // but ...
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. // SRPC constants, data structures, and parsing. package srpc import ( "bytes"; "math"; "os"; "strconv"; "syscall"; "unsafe"; ) // An Errno is an SRPC...
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 is a simple demo of Go running under Native Client. // It is a tetris clone built on top of the exp/nacl/av and exp/draw // packages. package main imp...
Go
// games/4s - a tetris clone // // Derived from Plan 9's /sys/src/games/xs.c // http://plan9.bell-labs.com/sources/plan9/sys/src/games/xs.c // // Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved. // Portions Copyright 2009 The Go Authors. All Rights Reserved. // Distributed under the terms ...
Go
// games/4s - a tetris clone // // Derived from Plan 9's /sys/src/games/xs.c // http://plan9.bell-labs.com/sources/plan9/sys/src/games/xs.c // // Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved. // Portions Copyright 2009 The Go Authors. All Rights Reserved. // Distributed under the terms ...
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. /* The datafmt package implements syntax-directed, type-driven formatting of arbitrary data structures. Formatting a data structure consists of two phases: fi...
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 datafmt import ( "container/vector"; "go/scanner"; "go/token"; "os"; "strconv"; "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 zlib import ( "compress/flate"; "hash"; "hash/adler32"; "io"; "os"; ) // These constants are copied from the flate package, so that code that imp...
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. // The zlib package implements reading and writing of zlib // format compressed files, as specified in RFC 1950. package zlib import ( "bufio"; "compress/fla...
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 func min(left int, right int) int { if left < right { return left } return right; } func minInt32(left int32, right int32) int32 { if left...
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. // The flate package implements the DEFLATE compressed data // format, described in RFC 1951. The gzip and zlib packages // implement access to DEFLATE-based 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 flate import ( "io"; "math"; "os"; "strconv"; ) const ( // The largest offset code. offsetCodeCount = 30; // The largest offset code in the ex...
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 ( "bytes"; "io"; "math"; "os"; ) const ( NoCompression = 0; BestSpeed = 1; fastCompression = 3; BestCompression = 9; Default...
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; fre...
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. // The gzip package implements reading (and eventually writing) of // gzip format compressed files, as specified in RFC 1952. package gzip import ( "bufio"; ...
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. // Functions and constants to support text encoded in UTF-8. // This package calls a Unicode character a rune for brevity. package utf8 import "unicode" // onl...
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. The format 'verbs' are derived from C's but are simpler. The verbs: Gene...
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"; ) const nByte = 64 const nPows10 = 160 var ldigits string = "0123456789abcdef" // var not const because we take its address...
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. // Rudimentary logging package. Defines a type, Logger, with simple // methods for formatting output to one or two destinations. Also has // predefined Loggers ...
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. // The bytes package implements functions for the manipulation of byte slices. // Analagous 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 ( "os"; ) // Copy from string to byte array at offset doff. Assume there's room. func copyS...
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. /* Data-driven templates for generating textual output such as HTML. See http://code.google.com/p/json-template/wiki/Reference for full documentation of th...
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. // Template library: default formatters package template import ( "bytes"; "fmt"; "io"; "strings"; ) // StringFormatter formats into the default string 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. // This package implements the Adler-32 checksum. // Defined in RFC 1950: // Adler-32 is composed of two sums accumulated per byte: s1 is // the sum of all byte...
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 import "io" // Hash is the common interface implemented by all hash functions. // The Write method never returns an error. // Sum returns the byt...
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 package implements the 32-bit cyclic redundancy check, or CRC-32, checksum. // See http://en.wikipedia.org/wiki/Cyclic_redundancy_check for information....
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 rand import ( "math"; ) /* * Exponential distribution * * See "The Ziggurat Method for Generating Random Variables" * (Marsaglia & Tsang, 2000) ...
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 rand implements pseudo-random number generators. package rand // A Source represents a source of uniformly-distributed // pseudo-random int64 values...
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 rand import ( "math"; ) /* * Normal distribution * * See "The Ziggurat Method for Generating Random Variables" * (Marsaglia & Tsang, 2000) * htt...
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 rand /* * Uniform distribution * * algorithm by * DP Mitchell and JA Reeds */ const ( _LEN = 607; _TAP = 273; _MAX = 1 << 63; _MASK = _MAX - ...
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 ( "container/vector"; "fmt"; "go/token"; "io"; "os"; "sort"; ) // An implementation of an ErrorHandler may be provided to the Sc...
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. // A scanner for Go source text. Takes a []byte as source which can // then be tokenized through repeated calls to the Scan function. // For a sample use of a s...
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. // A parser for Go source files. Input may be provided in a variety of // forms (see the various Parse* functions); the output is an abstract // syntax tree (AS...
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"; "fmt"; "go/ast"; "go/scanner"; "io"; "os"; pa...
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 ( "go/ast"; "io"; "strings"; "template"; // for htmlEscape ) // Comment ex...
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. // The doc package extracts source code documentation from a Go AST. package doc import ( "container/vector"; "go/ast"; "go/token"; "regexp"; "sort"; ) ...
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 package defines constants representing the lexical // tokens of the Go programming language and basic operations // on tokens (printing, predicates). //...
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. // The AST package declares the types used to represent // syntax trees for Go packages. // package ast import ( "go/token"; "unicode"; "utf8"; ) // -----...
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" func filterIdentList(list []*Ident) []*Ident { j := 0; for _, x := range list { if x.IsExported() { list[j] = x; j++;...
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 Visit returns true, Walk is invoked for each of 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 ast // A Scope maintains the set of identifiers visible // in the scope and a link to the immediately surrounding // (outer) scope. // // NOTE: WORK IN...
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. // The printer package implements printing of AST nodes. package printer import ( "bytes"; "fmt"; "go/ast"; "go/token"; "io"; "os"; "reflect"; "runtime...
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. // This package implements functions that are often useful in cryptographic // code but require careful thought to use correctly. package subtle // ConstantTim...
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 ( "os"; "strconv"; ) // The AES block size in bytes. const BlockSize = 16 // A Cipher is an instance of AES encryption using a particula...
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. // AES constants - 8720 bytes of initialized data. // This package implements AES encryption (formerly Rijndael), // as defined in U.S. Federal Information Pro...
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 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. // CMAC message authentication code, defined in // NIST Special Publication SP 800-38B. package block import ( "hash"; "os"; ) const ( // minimal irreduci...
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. // The block package implements standard block cipher modes // that can be wrapped around low-level block cipher implementations. // See http://csrc.nist.gov/gr...
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. // Output feedback (OFB) mode. // OFB converts a block cipher into a stream cipher by // repeatedly encrypting an initialization vector and // xoring the resul...
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 feedback (CFB) mode. // CFB provides confidentiality by feeding a fraction of // the previous ciphertext in as the plaintext for the next // block op...
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. // Electronic codebook (ECB) mode. // ECB is a fancy name for ``encrypt and decrypt each block separately.'' // It's a pretty bad thing to do for any large amou...
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. // Encrypt/decrypt data by xor with a pseudo-random data stream. package block import ( "io"; "os"; ) // A dataStream is an interface to an unending stream...
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. // EAX mode, not a NIST standard (yet). // EAX provides encryption and authentication. // EAX targets the same uses as NIST's CCM mode, // but EAX adds the abil...
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 tls import ( "crypto/rsa"; "io"; "os"; ) const ( // maxTLSCiphertext is the maximum length of a plaintext payload. maxTLSPlaintext = 16384; // 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 type alertLevel int type alertType int const ( alertLevelWarning alertLevel = 1; alertLevelError alertLevel = 2; ) const ( alertCloseNotify ...
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 // A recordProcessor accepts reassembled records, decrypts and verifies them // and routes them either to the handshake processor, to up to the 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. // This package partially implements the TLS 1.1 protocol, as specified in RFC 4346. package tls import ( "bytes"; "io"; "os"; "net"; "time"; ) // A Conn...
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/hmac"; "crypto/md5"; "crypto/sha1"; "hash"; "os"; "strings"; ) // Split a premaster secret in two as specified in...
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 ( "fmt"; "hash"; "io"; ) // writerEnableApplicationData is a message which instructs recordWriter to // start reading and transmitting d...
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 // The record reader handles reading from the connection and reassembling TLS // record structures. It loops forever doing this and writes the TLS ...
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; major, minor uint8; random []byte; sessionId []byte; cipherSuites []uint...
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 // The handshake goroutine reads handshake messages from the record processor // and outputs messages to be written on another channel. It updates ...
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. // The hmac package implements the Keyed-Hash Message Authentication Code (HMAC) // as defined in U.S. Federal Information Processing Standards Publication 198....
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 package 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 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 package implements the SHA1 hash algorithm as defined in RFC 3174. package sha1 import ( "hash"; "os"; ) // The size of a SHA1 checksum in bytes. 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. // 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 = 0x6...
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 package implements RSA encryption as specified in PKCS#1. package rsa // TODO(agl): Add support for PSS padding. import ( "big"; "bytes"; "crypto/s...
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 ( "big"; "bytes"; "crypto/subtle"; "io"; "os"; ) // This file implements encryption and decryption using PKCS#1 v1.5 padding. // Encr...
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. // NOTE: PACKAGE UNDER CONSTRUCTION. // // This package parses X.509-encoded keys and certificates. package x509 import ( "asn1"; "big"; "crypto/rsa"; "os"...
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. // MD5 block step. // In its own file so that a faster assembly or C version // can be substituted easily. package md5 // table[i] = int((1<<32) * abs(sin(i+1...
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 package implements the MD5 hash algorithm as defined in RFC 1321. package md5 import ( "hash"; "os"; ) // The size of an MD5 checksum in bytes. cons...
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. // The exec package runs external commands. package exec import ( "os"; "strings"; ) // Arguments to Run. const ( DevNull = iota; PassThrough; Pipe; Mer...
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 package implements buffered I/O. It wraps an io.Reader or io.Writer // object, creating another object (Reader or Writer) that also implements // the 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. // Utility functions. package io import ( "bytes"; "os"; "sort"; ) // ReadAll reads from r until an error or EOF and returns the data it read. func ReadAl...
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 package provides basic interfaces to I/O primitives. // Its primary job is to wrap existing implementations of such primitives, // such as those in pack...
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.Read // with code expecting an io.Write. package io import ( "os"; "sync"; ) type pipeReturn struct { n in...
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 directory contains the portable section of the Plan 9 C linkers. See ../6l, ../8l, and ../5l for more information. */ package documentation
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. /* Godefs is a bootstrapping tool for porting the Go runtime to new systems. It translates C type declarations into C or Go type declarations with the same mem...
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/doc"; "go/parser"; "go/scanner"; "os"; ) // A Cref refers 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. // Cgo; see gmp.go for an overview. // TODO(rsc): // Emit correct line number annotations. // Make 6g understand the annotations. package main import ( "fm...
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"; "exec"; "fmt"; "go/token"; "io"; "os"; ) // A ByteReaderAt implements io.ReadAt using a slice of bytes. type ByteReaderA...
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/ast"; "go/printer"; "os"; "strings"; ) func creat(name string) *os.File { f, err := os.Open(name, os.O_WRONLY|os.O_CRE...
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: cgo [compiler options] file.go The compiler options are passed through uninterpreted whe...
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 Crefs 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 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"; "container/vector"; "exec"; "flag"; "fmt"; "io"; "os"; "patch"; "path"; "sort"; "strings"; ) var checkSync = flag.B...
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 infrastructure to create an // (identifier) index for a set of Go files. // // Basic indexing algorithm: // - traverse all .go files o...
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: Go Documentation Server // Web server tree: // // http://godoc/ main landing page // http://godoc/doc/ serve from $GOROOT/doc - spec, mem, tutorial,...
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 mechanism to "linkify" html source // text containing EBNF sections (as found in go_spec.html). // The result is the input source text...
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 infrastructure to create a code // snippet for search results. // // Note: At the moment, this only creates HTML snippets. package ma...
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"; "flag"; "fmt"; "go/ast"; "go/doc"; "go/parser"; "go/printer"; "go/scanner"; "go/token"; "http"; "io"; "log"; "os"; ...
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 extracts and generates documentation for Go programs. It has two modes. Without the -http flag, it prints plain text documentation to standard outpu...
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. /* 6a 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 x86...
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. /* Gopack program is a variant of the Plan 9 ar tool. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/ar It adds a special Go-spe...
Go