code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package textproto implements generic support for text-based request/response // protocols in the style of HTTP, NNTP, and SMTP. // // The package provides: ...
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 textproto import ( "bufio" "fmt" "io" ) // A Writer implements convenience methods for writing // requests or responses to a text protocol network...
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 textproto // A MIMEHeader represents a MIME-style header mapping // keys to sets of values. type MIMEHeader map[string][]string // Add adds the key, ...
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 textproto import ( "bufio" "bytes" "io" "io/ioutil" "strconv" "strings" ) // BUG(rsc): To let callers manage exposure to denial of service // a...
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. // Network interface identification for FreeBSD package net import ( "os" "syscall" ) // If the ifindex is zero, interfaceMulticastAddrTable returns // ad...
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. // Read static host/IP entries from /etc/hosts. package net import ( "sync" "time" ) const cacheMaxAge = 5 * time.Minute // hostsPath points to the file w...
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. // UDP sockets package net // UDPAddr represents the address of a UDP end point. type UDPAddr struct { IP IP Port int } // Network returns the address'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. // Sockets for Linux package net import "syscall" func maxListenerBacklog() int { fd, err := open("/proc/sys/net/core/somaxconn") if err != nil { return...
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. // Simple file i/o and string manipulation, to avoid // depending on strconv and bufio and strings. package net import ( "io" "os" ) type file struct { 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. // IP sockets stubs for Plan 9 package net import ( "errors" "io" "os" "syscall" "time" ) // probeIPv6Stack returns two boolean values. If the first 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. // Waiting for FDs via epoll(7). package net import ( "os" "syscall" ) const ( readFlags = syscall.EPOLLIN | syscall.EPOLLRDHUP writeFlags = syscall.EPO...
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 // Network interface identification package net // If the ifindex is zero, interfaceTable returns mappings of all // network interfaces. Ot...
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 darwin freebsd linux netbsd openbsd package net import ( "os" "syscall" ) func newFileFD(f *os.File) (*netFD, error) { fd, err := syscall.Dup(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. // +build darwin freebsd linux netbsd openbsd windows // (Raw) IP sockets package net import ( "syscall" ) func sockaddrToIP(sa syscall.Sockaddr) Addr { ...
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. // Waiting for FDs via kqueue/kevent. package net import ( "os" "syscall" ) type pollster struct { kq int eventbuf [10]syscall.Kevent_t events [...
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 darwin freebsd linux netbsd openbsd package net import ( "errors" "sync" ) var ( protocols map[string]int onceReadProtocols sync.Once ...
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 net import ( "os" "sync" "syscall" "unsafe" ) var ( protoentLock sync.Mutex hostentLock sync.Mutex serventLock sync.Mutex ) // lookupProtoco...
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 darwin freebsd linux package net /* #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <stdlib.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. // +build darwin freebsd netbsd openbsd package net import "io" func sendFile(c *netFD, r io.Reader) (n int64, err error, handled bool) { return 0, nil, fa...
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 darwin freebsd netbsd openbsd // Socket options for BSD variants package net import ( "os" "syscall" ) func setDefaultSockopts(s, f, t int, ipv...
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 !cgo // Stub cgo routines for systems that do not use cgo to do network lookups. package net func cgoLookupHost(name string) (addrs []string, err ...
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 darwin freebsd linux netbsd openbsd windows // Unix domain sockets package net import ( "os" "syscall" "time" ) func unixSocket(net string, la...
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. // Socket options for Linux package net import ( "os" "syscall" ) func setDefaultSockopts(s, f, t int, ipv6only bool) error { switch f { case syscall.AF...
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 net import ( "errors" "io" "os" "runtime" "sync" "syscall" "time" "unsafe" ) var initErr error func init() { var d syscall.WSAData e := sys...
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. // Waiting for FDs via kqueue/kevent. package net import ( "errors" "os" "syscall" ) type pollster struct { kq int eventbuf [10]syscall.Kevent_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. // Network interface identification for NetBSD package net // If the ifindex is zero, interfaceMulticastAddrTable returns // addresses for all network interf...
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 darwin freebsd linux netbsd openbsd windows package net import "syscall" // Should we try to use the IPv4 socket interface if we're // only dealin...
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 strings implements simple functions to manipulate strings. package strings import ( "unicode" "unicode/utf8" ) // explode splits s into an array ...
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 strings import "io" // A Replacer replaces a list of strings with replacements. type Replacer struct { r replacer } // replacer is the interface tha...
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 strings import ( "errors" "io" "unicode/utf8" ) // A Reader implements the io.Reader, io.ReaderAt, io.Seeker, // io.ByteScanner, and io.RuneScanner...
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 sort provides primitives for sorting slices and user-defined // collections. package sort import "math" // A type, typically a collection, that sat...
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 implements binary search. package sort // Search uses binary search to find and return the smallest index i // in [0, n) at which f(i) is true, 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 sync import ( "sync/atomic" ) // Once is an object that will perform exactly one action. type Once struct { m Mutex done uint32 } // Do calls 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 sync // Cond implements a condition variable, a rendezvous point // for goroutines waiting for or announcing the occurrence // of an event. // // Each ...
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 sync provides basic synchronization primitives such as mutual // exclusion locks. Other than the Once and WaitGroup types, most are intended // for ...
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 sync import "sync/atomic" // A WaitGroup waits for a collection of goroutines to finish. // The main goroutine calls Add to set the number of // gorou...
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 atomic provides low-level atomic memory primitives // useful for implementing synchronization algorithms. // // These functions require great care t...
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 sync // defined in package runtime // Semacquire waits until *s > 0 and then atomically decrements it. // It is intended as a simple sleep primitive ...
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 sync import "sync/atomic" // An RWMutex is a reader/writer mutual exclusion lock. // The lock can be held by an arbitrary number of readers // or a si...
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. /* 8l is the linker for the 32-bit x86. The $GOARCH for these tools is 386. The flags are documented in ../ld/doc.go. */ 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. /* 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 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. /* 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. /* 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. // 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 support functionality for godoc. package main import ( pathpkg "path" "sync" "time" "unicode/utf8" ) // An RWValue wraps a value an...
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, etc. // h...
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. package main // This file contains the mechanism to "linkify" html source // text containing EBNF sections (as found in go_spec.html). // The result is the inp...
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 contains support functions for parsing .go files. // Similar functionality is found in package go/parser but the // functions here operate using go...
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 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 defines types for abstract file system access and // provides an implementation accessing the file system of the // underlying OS. package main i...
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. // 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 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 provides an implementation of the FileSystem // interface based on the contents of a .zip file. // // Assumptions: // // - The file paths stored 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" "encoding/json" "flag" "fmt" "go/ast" "go/build" "go/doc" "go/printer" "go/token" "io" "io/ioutil" "log" "net/http" ...
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" "log" "os" pathpkg "...
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 appengine package main // This file replaces main.go when running godoc under app-engine. // See README.godoc-app for details. import ( "archive/z...
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. // Template support for writing HTML documents. // Documents that include Template: true in their // metadata are executed as input to text/template. // // Thi...
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 "time" // A Throttle permits throttling of a goroutine by // calling the Throttle method repeatedly. // type Throttle struct { f float64...
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. // 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. package main import ( "bytes" "debug/elf" "debug/macho" "debug/pe" "fmt" "go/ast" "go/printer" "go/token" "os" "strings" ) var conf = printer.Confi...
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. 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. /* Pack 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 sect...
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. // Api computes the exported API of a set of Go packages. // // BUG(bradfitz): Note that this tool is only currently suitable // for use on the Go standard lib...
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 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 printf-checker. package main import ( "flag" "fmt" "go/ast" "go/token" "strings" "unicode/utf8" ) var printfuncs = flag.Strin...
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. // Vet is a simple checker for static errors in Go source code. // See doc.go for more information. package main import ( "bytes" "flag" "fmt" "go/ast" "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. // This file contains the code to check canonical methods. package main import ( "fmt" "go/ast" "go/printer" "strings" ) type MethodSig struct { args ...
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 test for canonical struct tags. package main import ( "go/ast" "reflect" "strconv" ) // checkField checks a struct field tag. fu...
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. // This file contains the test for untagged struct literals. package main import ( "go/ast" "strings" ) // checkUntaggedLiteral checks if a composite liter...
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. /* Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string. Vet uses heuristics...
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. /* Cov is a rudimentary code coverage tool. Usage: go tool cov [-lsv] [-g substring] [-m minlines] [6.out args] Given a command to run, it runs the command ...
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 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. /* 6l is the linker for the x86-64. The $GOARCH for these tools is amd64. The flags are documented in ../ld/doc.go. */ 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. /* 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. // 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. // NOTE: If you change this file you must run "./mkbuiltin" // to update builtin.c. This is not done automatically // to avoid depending on having a working co...
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" "encoding/json" "io" "os" "text/template" ) var cmdList = &Command{ UsageLine: "list [-e] [-f format] [-json] [packages]"...
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 var helpPackages = &Command{ UsageLine: "packages", Short: "description of package lists", Long: ` Many commands apply to a set of package...
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" "errors" "fmt" "go/build" "go/scanner" "go/token" "os" pathpkg "path" "path/filepath" "sort" "strings" "time" "unic...
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 !cmd_go_bootstrap // This code is compiled into the real 'go' binary, but it is not // compiled into the binary that is built during all.bash, so as...
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/build" "io" "log" "os" "os/exec" "path" "path/filepath" "regexp" "runtime" "strings" "sync" "tex...
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 main import ( "fmt" "runtime" "strings" ) var cmdEnv = &Command{ Run: runEnv, UsageLine: "env [var ...]", Short: "print Go environmen...
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" "os/exec" "strings" ) var cmdRun = &Command{ UsageLine: "run [build flags] gofiles... [arguments...]", Short: "com...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main var cmdFix = &Command{ Run: runFix, UsageLine: "fix [packages]", Short: "run go tool fix on packages", Long: ` Fix runs the Go fix ...
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 cmd_go_bootstrap // This code is compiled only into the bootstrap 'go' binary. // These stubs avoid importing packages with large dependency // tree...
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. /* Go is a tool for managing Go source code. Usage: go command [arguments] The commands are: build compile packages and dependencies clean ...
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: Dashboard upload package main import ( "fmt" "go/build" "os" "path/filepath" "regexp" "runtime" "strconv" "strings" ) var cmdGet = &Command...
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 go test is large and distracting. // We can't use the flag package bec...
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 !cmd_go_bootstrap // This code is compiled into the real 'go' binary, but it is not // compiled into the binary that is built during all.bash, so as...
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" "container/heap" "errors" "fmt" "go/build" "io" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" "regexp" "...
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" "runtime" ) var cmdVersion = &Command{ Run: runVersion, UsageLine: "version", Short: "print Go version", Long: ...
Go