code
stringlengths
10
1.34M
language
stringclasses
1 value
// 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 packet import ( "io" "io/ioutil" "os" "strings" ) // UserId contains text that is intended to represent the name and email // address of the key h...
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 packet import ( "big" "crypto" "crypto/dsa" "crypto/openpgp/error" "crypto/openpgp/s2k" "crypto/rand" "crypto/rsa" "encoding/binary" "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 packet import ( "crypto/cipher" "crypto/openpgp/error" "crypto/rand" "crypto/sha1" "crypto/subtle" "hash" "io" "os" "strconv" ) // Symmetrica...
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 packet import ( "big" "bytes" "crypto/cipher" "crypto/dsa" "crypto/openpgp/error" "crypto/openpgp/s2k" "crypto/rsa" "crypto/sha1" "io" "io/io...
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 packet import ( "crypto" "crypto/openpgp/error" "crypto/openpgp/s2k" "encoding/binary" "io" "os" "strconv" ) // OnePassSignature represents a 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 packet import ( "bytes" "crypto/cipher" "crypto/openpgp/error" "crypto/openpgp/s2k" "io" "os" "strconv" ) // This is the largest session key th...
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 packet implements parsing and serialization of OpenPGP packets, as // specified in RFC 4880. package packet import ( "big" "crypto/aes" "crypto/c...
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. /* Implementation adapted from Needham and Wheeler's paper: http://www.cix.co.uk/~klockstone/xtea.pdf A precalculated look up table is used during encryptio...
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 xtea implements XTEA encryption, as defined in Needham and Wheeler's // 1997 technical report, "Tea extensions." package xtea // For details, see ht...
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" "os" ) func init() { crypto.RegisterHash(...
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 ( "big" "crypto/rand" "crypt...
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" "crypto" "crypto/subtle" "io" "os" ) // This file implements encryption and decryption using PKCS#1 v1.5 padding. // EncryptP...
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 ( "asn1" "big" "bytes" "container/vector" "crypto" "crypto/dsa" "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. package x509 import ( "os" "strings" "time" ) type InvalidReason int const ( // NotAuthorizedToSign results when a certificate is signed by another // w...
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/x509/pkix" "encoding/pem" "strings" ) // Roots is a set of certificates. type CertPool struct { bySubjectKeyId map[string][]...
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. // Package md5 implements the MD5 hash algorithm as defined in RFC 1321. package md5 import ( "crypto" "hash" "os" ) func init() { crypto.RegisterHash(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. // Package exec runs external commands. It wraps os.StartProcess to make it // easier to remap stdin and stdout, connect I/O with pipes, and do other // adjustm...
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 exec import ( "os" "strings" ) // ErrNotFound is the error resulting if a path search failed to find an executable file. var ErrNotFound = os.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 exec import ( "os" "strings" ) // ErrNotFound is the error resulting if a path search failed to find an executable file. var ErrNotFound = os.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 try contains the executable part of the gotry command. // It is not intended for general use. package try import ( "fmt" "io" "os" "reflect" "u...
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" ) // Random number state, accessed without lock; racy but harmless. // We generate random temporary...
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 ( "os" "sync" ) type pipeResult struct { n ...
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 import "os" type multiReader struct { readers []Reader } func (mr *multiReader) Read(p []byte) (n int, err os.Error) { for len(mr.readers) > 0 {...
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 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 ( "flag" "fmt" "go/ast" "go/parser" "go/scanner" "go/token" "go/types" "io/ioutil" "os" "path/filepath" "strings" ) 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. /* 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 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" "go/token" "os" "strings" ) fu...
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 ( "exec" "fmt" "go/token" "io/ioutil" "os" ) // run runs the command argv, feeding in stdin on standard input. // It returns the out...
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" "strings" ) // writeDefs creates out...
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 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 ( "bytes" "exec" "flag" "fmt" "go/parser" "go/printer" "go/scanner" "go/token" "io/ioutil" "os" "path/filepath" "sort" "string...
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" ) var procattrFix = fix{ "procattr", procattr, `Adapt calls to os.StartProcess to use new ProcAttr type. http...
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. // TODO(rsc): Once there is better support for writing // multi-package commands, this should really be in // its own package, and then we can drop all the "re...
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" ) var httpserverFix = fix{ "httpserver", httpserver, `Adapt http server methods and functions to changes made ...
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" ) var netdialFix = fix{ "netdial", netdial, `Adapt 3-argument calls of net.Dial to use 2-argument form. http://codereview...
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" ) var osopenFix = fix{ "osopen", osopen, `Adapt os.Open calls to new, easier API and rename O_CREAT O_CREATE. http://cod...
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 ( "fmt" "go/ast" "go/token" "os" "reflect" "strings" ) // Partial type checker. // // The fact that it is partial is very important...
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 ( "fmt" "go/ast" "go/token" "os" "strconv" ) type fix struct { name string f func(*ast.File) bool desc string } // main runs ...
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" ) var httpFinalURLFix = fix{ "httpfinalurl", httpfinalurl, `Adapt http Get calls to not have a finalURL result parameter. ...
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. /* Gofix finds Go programs that use old APIs and rewrites them to use newer ones. After you update to a new Go release, gofix helps make the necessary changes ...
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 ( "fmt" "log" "os" "path/filepath" "runtime" "strings" ) var ( gopath []*pkgroot imports []string defaultRoot *pkgroot ...
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. // Experimental Go package installer; see doc.go. package main import ( "bytes" "exec" "flag" "fmt" "go/token" "io/ioutil" "os" "path/filepath" "run...
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. // Run "make install" to build package. package main import ( "bytes" "os" "path/filepath" "template" ) // domake builds the package in dir. // domake g...
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. // Wrappers for Go parser. package main import ( "go/ast" "go/parser" "log" "os" "path/filepath" "strconv" "strings" "runtime" ) type dirInfo struc...
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. /* Goinstall is an experiment in automatic package installation. It installs packages, possibly downloading them from the internet. It maintains a list of publ...
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. // Download remote packages. package main import ( "http" "os" "path/filepath" "regexp" "strings" ) const dashboardURL = "http://godashboard.appspot.co...
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. /* The gomake command runs GNU make with an appropriate environment for using the conventional Go makefiles. If $GOROOT is already set in the environment, run...
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/ioutil" "os" "patch" "path/filepath" "sort" "strings" ) var checkSync = 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. // This file contains the infrastructure to create an // identifier and full-text index for a set of Go files. // // Algorithm for identifier index: // - traver...
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 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 support functionality for godoc. package main import ( "io" "io/ioutil" "os" "path/filepath" "sort" "strings" "sync" "time" "ut...
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. // The /doc/codewalk/ tree is synthesized from codewalk descriptions, // files named $GOROOT/doc/codewalk/*.xml. // For an example and a description of the form...
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 the Mapping data structure. package main import ( "fmt" "io" "os" "path" "path/filepath" "sort" "strings" ) // A Mapping obje...
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 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 the code dealing with package directory trees. package main import ( "bytes" "go/doc" "go/parser" "go/token" "io/ioutil" "log" "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. // This file implements FormatSelections and FormatText. // FormatText is used to HTML-format Go and non-Go source // text with line numbers and highlighted sec...
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/token" "http" "io" "io/ioutil" "log" "os" "path" "path...
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 runs in command-line mode and prints plain text 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. /* 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 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-specific se...
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" "ebnf" "flag" "fmt" "go/scanner" "go/token" "io/ioutil" "os" "path/filepath" ) var fset = token.NewFileSet() var start...
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 gramatically correct. It reads them from an HTML document such as the Go specification. Grammar ...
Go
/* Derived from Inferno's utils/iyacc/yacc.c http://code.google.com/p/inferno-os/source/browse/utils/iyacc/yacc.c This copyright NOTICE applies to all files in this directory and subdirectories, unless another copyright notice appears in a given file or subdirectory. If you take substantial code from this software 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. /* Goyacc is a version of yacc for Go. It is written in Go and generates parsers written in Go. It is largely transliterated from the Inferno version written ...
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 compilers. See ../6c, ../8c, and ../5c 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. /* 6c is a version of the Plan 9 C compiler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2c Its target architecture is the x8...
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: If you change this file you must run "./mkbuiltin" // to update builtin.c.boot. This is not done automatically // to avoid depending on having a worki...
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: If you change this file you must run "./mkbuiltin" // to update builtin.c.boot. This is not done automatically // to avoid depending on having a worki...
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. /* Gc is the generic label for the family of Go compilers that function as part of the (modified) Plan 9 tool chain. The C compiler documentation at http://...
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. /* 5c is a version of the Plan 9 C compiler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2c Its target architecture is the AR...
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 ( "bufio" "exec" "fmt" "go/ast" "go/parser" "go/token" "io/ioutil" "os" "path/filepath" "runtime" "strings" "time" "unicode" ...
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 ( "fmt" "os" "strconv" "strings" ) // The flag handling part of gotest is large and distracting. // We can't use the flag package beca...
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. /* Gotest is an automated testing tool for Go packages. Normally a Go package is compiled without its test files. Gotest is a tool that recompiles the 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. /* 8c is a version of the Plan 9 C compiler. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/2c Its target architecture is the x8...
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" "flag" "fmt" "go/ast" "go/parser" "go/printer" "go/scanner" "go/token" "io" "io/ioutil" "os" "path/filepath" ...
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 main import ( "go/ast" "reflect" ) type simplifier struct{} func (s *simplifier) Visit(node ast.Node) ast.Visitor { switch n := node.(type) { ca...
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. /* Gofmt formats Go programs. Without an explicit path, it processes the standard input. Given a file, it operates on that file; given a directory, it operate...
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/parser" "go/token" "os" "reflect" "strings" "unicode" "utf8" ) func initRewrite() { if *rewriteRule == ""...
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. /* 8a 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. /* Prof is a rudimentary real-time profiler. Given a command to run or the process id (pid) of a command already running, it samples the program's state at re...
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. /* Cov is a rudimentary code coverage tool. Given a command to run, it runs the command while tracking which sections of code have been executed. When the 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. /* 5g is the version of the gc compiler for the ARM. The $GOARCH for these tools is arm. It reads .go files and outputs .5 files. The flags are documented in ...
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. // Govet is a simple checker for static errors in Go source code. // See doc.go for more information. package main import ( "flag" "fmt" "io" "go/ast" "go...
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. /* Govet does simple checking of Go source code. It checks for simple errors in calls to functions named Print Printf Println Fprint Fprintf Fprintln Sprin...
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. /* Nm is a version of the Plan 9 nm command. The original is documented at http://plan9.bell-labs.com/magic/man2html/1/nm It prints the name list (symbol 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. /* 6g is the version of the gc compiler for the x86-64. The $GOARCH for these tools is amd64. It reads .go files and outputs .6 files. The flags are documente...
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 ( "fmt" "rand" ) const ( win = 100 // The winning score in a game of Pig gamesPerSeries = 10 // The number of games per se...
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 main import ( "http" "log" "time" ) const ( numPollers = 2 // number of Poller goroutines to launch second = 1e9 //...
Go