code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package oracle import ( "bytes" "fmt" "go/ast" "go/token" "os" "strings" "code.google.com/p/go.tools/astutil" "code.google.com/p/go.tools/go/exact" "...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package intsets var a [1 << 8]byte func init() { for i := range a { var n byte for x := i; x != 0; x >>= 1 { if x&1 != 0 { n++ } } a[i] = n...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package intsets provides Sparse, a compact and fast representation // for sparse sets of int values. // // The time complexity of the operations Len, Insert,...
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 2013 The Go Authors. 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" "fmt" "os" "strings" "unicode" ) var ( nl = []byte("\n") slashSlash = []byte("//") plusBuild = []byte("+build"...
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 unkeyed struct literals. package main import ( "flag" "go/ast" "strings" "code.google.com/p/go.tools/cmd/vet/whitelist...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check for syntactically unreachable code. package main import ( "go/ast" "go/token" ) type deadState struct { f *File hasBreak map[ast.S...
Go
// Copyright 2013 The Go 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 for useless assignments. */ package main import ( "go/ast" "go/token" "reflect" ) // TODO: should also check for a...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file contains the printf-checker. package main import ( "bytes" "flag" "go/ast" "go/token" "strconv" "strings" "unicode/utf8" "code.google.co...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check for invalid uintptr -> unsafe.Pointer conversions. package main import ( "go/ast" "go/token" "code.google.com/p/go.tools/go/types" ) func (f *F...
Go
// Copyright 2013 The Go Authors. 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" ) // checkAtomicAssignment walks the assignment statement checking for common // mistaken usage of atomic package,...
Go
// Copyright 2013 The Go 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 for useless function comparisons. A useless comparison is one like f == nil as opposed to f() == nil. */ package main ...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package whitelist defines exceptions for the vet tool. package whitelist // UnkeyedLiteral are types that are actually slices, but // syntactically, we cann...
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 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 code to check range loop variables bound inside function literals that are deferred or launched in new goroutines. We only check insta...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Identify mismatches between assembly files and Go func declarations. package main import ( "bytes" "fmt" "go/ast" "go/token" "regexp" "strconv" "st...
Go
// Copyright 2013 The Go 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 for shadowed variables. A shadowed variable is a variable declared in an inner scope with the same name and type as a va...
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 2013 The Go 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 that locks are not passed by value. package main import ( "bytes" "fmt" "go/ast" "code.google.com/p/go.tools/go/t...
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 pieces of the tool that use typechecking from the go/types package. package main import ( "go/ast" "go/token" "code.google.com/p...
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 2014 The Go Authors. 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" "os" "sort" "strconv" "text/tabwriter" ) var ( changedOnly = flag.Bool("changed", false, "show only benchmarks that ...
Go
// Copyright 2014 The Go Authors. 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" "math" ) // BenchCmp is a pair of benchmarks. type BenchCmp struct { Before *Bench After *Bench } // Correlate correlates be...
Go
// Copyright 2014 The Go Authors. 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" "bytes" "fmt" "io" "strconv" "strings" ) // Flags used by Bench.Measured to indicate // which measurements a Bench contain...
Go
// Copyright 2014 The Go 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 benchcmp command displays performance changes between benchmarks. Benchcmp parses the output of two 'go test' benchmark runs, correlates the results pe...
Go
// The eg command performs example-based refactoring. package main import ( "flag" "fmt" "go/parser" "go/printer" "go/token" "os" "path/filepath" "code.google.com/p/go.tools/go/loader" "code.google.com/p/go.tools/refactor/eg" ) var ( helpFlag = flag.Bool("help", false, "show detailed help message") ...
Go
// Copyright 2013 The Go 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 program takes an HTML file and outputs a corresponding article file in // present format. See: code.google.com/p/go.tools/present package main import ...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // ssadump: a tool for displaying and interpreting the SSA form of Go programs. package main import ( "flag" "fmt" "go/build" "os" "runtime" "runtime/ppr...
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 like the front-end of a Go compiler. Errors are reported if the analysis fai...
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/build" "go/parser" "go/scanner" "go/token" "io/ioutil" "os" "path/filepath" "runtime" "time" "cod...
Go
// Copyright 2014 The Go Authors. 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" "fmt" "go/token" "io" "math/big" "code.google.com/p/go.tools/go/exact" "code.google.com/p/go.tools/go/types" ) // TODO(g...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "errors" "flag" "fmt" "go/build" "io/ioutil" "os" "path/filepath" "strings" "code.google.com/p/go.tools/go/types" ) var ( sou...
Go
// Copyright 2014 The Go 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 writing of types. The functionality is lifted // directly from go/types, but now contains various modifications for // nicer output. // ...
Go
// Copyright 2014 The Go 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 access to export data from source. package main import ( "code.google.com/p/go.tools/go/types" ) func init() { register("source", s...
Go
// Copyright 2014 The Go 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 access to gc-generated export data. package main import ( "code.google.com/p/go.tools/go/gcimporter" ) func init() { register("gc",...
Go
// Copyright 2014 The Go 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 access to gccgo-generated export data. package main import ( "debug/elf" "fmt" "io" "io/ioutil" "os" "path/filepath" "strings" ...
Go
// Copyright 2014 The Go 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 godex command prints (dumps) exported information of packages // or selected package objects. // // In contrast to godoc, godex extracts this information...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // oracle: a tool for answering questions about Go source code. // http://golang.org/s/oracle-design // http://golang.org/s/oracle-user-manual // // Run with -h...
Go
// Copyright 2013 The Go Authors. 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" "bytes" "fmt" "html/template" "io" "io/ioutil" "math" "os" "os/exec" "path/filepath" "runtime" "code.google.com/p/go...
Go
// Copyright 2013 The Go 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 visitor that computes the (line, column)-(line-column) range for each function. package main import ( "bufio" "fmt" "go/ast" "...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "bytes" "flag" "fmt" "go/ast" "go/parser" "go/printer" "go/token" "io" "io/ioutil" "log" "os" "path/filepath" "sort" "strco...
Go
// Copyright 2009 The Go 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 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 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 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 2013 The Go Authors. 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/build" "log" "net/http" "os" "path/filepath" "runtime" "strings" "sync" "code.google.com/p/go.tools/blog" "code.goo...
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 ( "encoding/json" "fmt" "go/format" "net/http" // This package registers "/compile" and "/share" handlers // that redirect to the 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. // +build !appengine package main import ( "errors" "flag" "io" "log" "net/http" "net/url" "os" ) func handleRemoteSearch() { // Command-line queries...
Go
// Copyright 2009 The Go 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 2013 The Go Authors. 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/scanner" "io" "io/ioutil" "os" "os/exec" "path/filepath" "runtime" "strings" "code.google.com/p/go....
Go
/* Command goimports updates your Go import lines, adding missing ones and removing unreferenced ones. $ go get code.google.com/p/go.tools/cmd/goimports It's a drop-in replacement for your editor's gofmt-on-save hook. It has the same command-line interface as gofmt and formats your code in the same way. For em...
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" "html/template" "io" "log" "net/http" "os" "path/filepath" "sort" "code.google.com/p/go.tools/present" ) func init() { ...
Go
// Copyright 2013 The Go 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 import ( "flag" "fmt" "go/build" "log" "net" "net/http" "net/url" "os" "runtime" "strings" "code.google.com/p/g...
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 appengine package main import ( "code.google.com/p/go.tools/present" _ "code.google.com/p/go.tools/playground" ) var basePath = "./present/" f...
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 ( "bytes" "fmt" "io/ioutil" "net/http" "path/filepath" "time" "code.google.com/p/go.tools/godoc/static" ) var scripts = []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. /* Present displays slide presentations and articles. It runs a web server that presents slide and article files from the current directory. It may be run as a...
Go
// Copyright 2013 The Go Authors. 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" "encoding/xml" "flag" "fmt" "io/ioutil" "net/http" "net/url" "os" "os/exec" "strings" ) var ( builde...
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" "io" "io/ioutil" "log" "os" "path/filepath" "regexp" "runtime" "strconv" "strings" "time" "code.googl...
Go
// Copyright 2013 The Go Authors. 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" "bytes" "fmt" "io" "io/ioutil" "log" "os" "os/exec" "path/filepath" "regexp" "strconv" "strings" ) // benchHash benc...
Go
// Copyright 2013 The Go 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 dragonfly freebsd linux netbsd openbsd package main import ( "sync" "syscall" ) // FileMutex is similar to sync.RWMutex, but also synchron...
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" "encoding/json" "errors" "fmt" "io" "log" "net/http" "net/url" "time" ) type obj map[string]interface{} // dash runs t...
Go
// Copyright 2013 The Go Authors. 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 ( "encoding/xml" "fmt" "os" "path/filepath" "strings" "sync" "code.google.com/p/go.tools/go/vcs" ) // Repo represents a mercurial ...
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" "fmt" "io" "log" "os" "os/exec" "time" ) // run is a simple wrapper for exec.Run/Close func run(d time.Duration, envv []s...
Go
// Copyright 2013 The Go Authors. 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 ( "sync" "syscall" "unsafe" ) var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procLockFileEx = modkernel32.NewProc("Loc...
Go
// Copyright 2013 The Go 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 nacl plan9 solaris package main import ( "log" "sync" ) // FileMutex is similar to sync.RWMutex, but also synchronizes across processes. // This ...
Go
// Copyright 2013 The Go Authors. 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" "fmt" "io/ioutil" "os" "path/filepath" "runtime" "strings" "code.google.com/p/go.tools/go/vcs" ) // These variables are...
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. /* Go Builder is a continuous build client for the Go project. It integrates with the Go Dashboard AppEngine application. Go Builder is intended to run contin...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package playground registers HTTP handlers at "/compile" and "/share" that // proxy requests to the golang.org playground service. // This package may be us...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !appengine // Package socket implements an WebSocket-based playground backend. // Clients connect to a websocket handler and send run/kill commands,...
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 !appengine package playground import ( "log" "net/http" ) func client(r *http.Request) *http.Client { return http.DefaultClient } func report(...
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 appengine package playground import ( "net/http" "appengine" "appengine/urlfetch" ) func client(r *http.Request) *http.Client { return urlfet...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package astutil contains common utilities for working with the Go AST. package astutil import ( "bufio" "bytes" "fmt" "go/ast" "go/format" "go/parser"...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package astutil // This file defines utilities for working with source positions. import ( "fmt" "go/ast" "go/token" "sort" ) // PathEnclosingInterval re...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package httpfs implements http.FileSystem using a godoc vfs.FileSystem. package httpfs import ( "fmt" "io" "net/http" "os" "code.google.com/p/go.tools...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package vfs import ( "fmt" "io/ioutil" "os" pathpkg "path" "path/filepath" ) // OS returns an implementation of FileSystem reading from the // tree roote...
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 vfs import ( "fmt" "io" "os" pathpkg "path" "sort" "strings" "time" ) // Setting debugNS = true will enable debugging prints about // name spac...
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 zipfs file provides an implementation of the FileSystem // interface based on the contents of a .zip file. // // Assumptions: // // - The file paths ...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package mapfs file provides an implementation of the FileSystem // interface based on the contents of a map[string]string. package mapfs import ( "io" "os...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package gatefs provides an implementation of the FileSystem // interface that wraps another FileSystem and limits its concurrency. package gatefs import ( ...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package vfs defines types for abstract file system access and provides an // implementation accessing the file system of the underlying OS. package vfs impo...
Go
// Copyright 2009 The Go 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 go...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // Command bake takes a list of file names and writes a Go source file to // standard output that declares a map of string constants containin...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package static exports a map of static file content that supports the godoc // user interface. The map should be used with the mapfs package, see // code.goo...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package godoc import ( "bytes" "fmt" "net/http" "regexp" "strings" ) type SearchResult struct { Query string Alert string // error or warning message ...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package godoc import ( "fmt" "go/ast" "go/build" "io" "log" "os" pathpkg "path" "path/filepath" "regexp" "strings" "code.google.com/p/go.tools/godoc...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package godoc is a work-in-progress (2013-07-17) package to // begin splitting up the godoc binary into multiple pieces. // // This package comment will evol...
Go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package godoc import ( "net/http" "runtime" ) // Page describes the contents of the top-level godoc webpage. type Page struct { Title string Tabtitle s...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package util contains utility types and functions for godoc. package util import ( pathpkg "path" "sync" "time" "unicode/utf8" "code.google.com/p/go.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 util import "time" // A Throttle permits throttling of a goroutine by // calling the Throttle method repeatedly. // type Throttle struct { f float64...
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 2013 The Go 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 LinkifyText which introduces // links for identifiers pointing to their declarations. // The approach does not cover all cases because g...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package godoc import ( "errors" pathpkg "path" "time" "code.google.com/p/go.tools/godoc/analysis" "code.google.com/p/go.tools/godoc/util" "code.google.c...
Go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package godoc import ( "net/http" "regexp" "sync" "text/template" "code.google.com/p/go.tools/godoc/vfs/httpfs" ) // SearchResultFunc functions return 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 godoc // This file contains the mechanism to "linkify" html source // text containing EBNF sections (as found in go_spec.html). // The result is the 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 an // identifier and full-text index for a set of Go files. // // Algorithm for identifier index: // - traver...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package analysis // This file computes the "implements" relation over all pairs of // named types in the program. (The mark-up is done by typeinfo.go.) // TO...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package analysis // This file computes the channel "peers" relation over all pairs of // channel operations in the program. The peers are displayed in the // ...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package analysis // This file computes the markup for information from go/types: // IMPORTS, identifier RESOLUTION, METHOD SETS, size/alignment, and // the IMP...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package analysis performs type and pointer analysis // and generates mark-up for the Go source view. // // The Run method populates a Result object by runnin...
Go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package analysis // This file computes the CALLERS and CALLEES relations from the call // graph. CALLERS/CALLEES information is displayed in the lower pane //...
Go