mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
tools: add import comments.
Change-Id: Idda6e64580432cb9a731e4ebf4005ee4ceb4202d Reviewed-on: https://go-review.googlesource.com/1244 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
6e0e92af7e
commit
24257c8cd2
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package astutil contains common utilities for working with the Go AST.
|
||||
package astutil
|
||||
package astutil // import "golang.org/x/tools/astutil"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Adapted from encoding/xml/read_test.go.
|
||||
|
||||
// Package atom defines XML data structures for an Atom feed.
|
||||
package atom
|
||||
package atom // import "golang.org/x/tools/blog/atom"
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package blog implements a web server for articles written in present format.
|
||||
package blog
|
||||
package blog // import "golang.org/x/tools/blog"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -34,4 +34,4 @@ in a format like this:
|
||||
BenchmarkConcat 80 48 -40.00%
|
||||
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/benchcmp"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// callgraph: a tool for reporting the call graph of a Go program.
|
||||
// See Usage for details, or run with -help.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/callgraph"
|
||||
|
||||
// TODO(adonovan):
|
||||
//
|
||||
|
@ -18,4 +18,4 @@ For usage information, please see:
|
||||
go help testflag
|
||||
go tool cover -help
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/cover"
|
||||
|
@ -12,7 +12,7 @@
|
||||
// a comment syntax, etc.
|
||||
// - allow queries to nest, like Blaze query language.
|
||||
//
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/digraph"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// The eg command performs example-based refactoring.
|
||||
// For documentation, run the command, or see Help in
|
||||
// code.google.com/p/go.tools/refactor/eg.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/eg"
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
@ -63,7 +63,7 @@
|
||||
//
|
||||
// If no -s argument is provided, godex will try to find a matching source.
|
||||
//
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/godex"
|
||||
|
||||
// BUG(gri): support for -s=source is not yet implemented
|
||||
// BUG(gri): gccgo-importing appears to have occasional problems stalling godex; try -s=gc as work-around
|
||||
|
@ -141,4 +141,4 @@ See "Godoc: documenting Go code" for how to write good comments for godoc:
|
||||
http://golang.org/doc/articles/godoc_documenting_go_code.html
|
||||
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/godoc"
|
||||
|
@ -30,4 +30,4 @@ For other editors, you probably know what to do.
|
||||
Happy hacking!
|
||||
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/goimports"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// The gorename command performs precise type-safe renaming of
|
||||
// identifiers in Go source code. See the -help message or Usage
|
||||
// constant for details.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/gorename"
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
@ -59,4 +59,4 @@ To verify the output of a pipe:
|
||||
echo "package foo" | gotype
|
||||
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/gotype"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// This program takes an HTML file and outputs a corresponding article file in
|
||||
// present format. See: golang.org/x/tools/present
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/html2article"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -8,7 +8,7 @@
|
||||
//
|
||||
// Run with -help flag or help subcommand for usage information.
|
||||
//
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/oracle"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -28,4 +28,4 @@ the generated output. The supported formats are:
|
||||
The present file format is documented by the present package:
|
||||
http://godoc.org/golang.org/x/tools/present
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/present"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// ssadump: a tool for displaying and interpreting the SSA form of Go programs.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/ssadump"
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
@ -56,7 +56,7 @@
|
||||
// where t is the lower-cased name of the first type listed. It can be overridden
|
||||
// with the -output flag.
|
||||
//
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/stringer"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -179,4 +179,4 @@ These flags configure the behavior of vet:
|
||||
-test
|
||||
For testing only: sets -all and -shadow.
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/cmd/vet"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package whitelist defines exceptions for the vet tool.
|
||||
package whitelist
|
||||
package whitelist // import "golang.org/x/tools/cmd/vet/whitelist"
|
||||
|
||||
// UnkeyedLiteral are types that are actually slices, but
|
||||
// syntactically, we cannot tell whether the Typ in pkg.Typ{1, 2, 3}
|
||||
|
@ -11,7 +11,7 @@
|
||||
// map type. The IsEmpty, Min, Max, Clear and TakeMin operations
|
||||
// require constant time.
|
||||
//
|
||||
package intsets
|
||||
package intsets // import "golang.org/x/tools/container/intsets"
|
||||
|
||||
// TODO(adonovan):
|
||||
// - Add SymmetricDifference(x, y *Sparse), i.e. x ∆ y.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package cover provides support for parsing coverage profiles
|
||||
// generated by "go test -coverprofile=cover.out".
|
||||
package cover
|
||||
package cover // import "golang.org/x/tools/cover"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -55,4 +55,4 @@ If the Google Code credentials are not provided the archival step
|
||||
will be skipped.
|
||||
|
||||
*/
|
||||
package main
|
||||
package main // import "golang.org/x/tools/dashboard/builder"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
package main // import "golang.org/x/tools/dashboard/coordinator/buildongce"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// The coordinator runs on GCE and coordinates builds in Docker containers.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/dashboard/coordinator"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
package main // import "golang.org/x/tools/dashboard/updater"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Command watcher watches the specified repository for new commits
|
||||
// and reports them to the build dashboard.
|
||||
package main
|
||||
package main // import "golang.org/x/tools/dashboard/watcher"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
// All I/O is done via the build.Context file system interface, which must
|
||||
// be concurrency-safe.
|
||||
package buildutil
|
||||
package buildutil // import "golang.org/x/tools/go/buildutil"
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
|
@ -32,7 +32,7 @@ in the call graph; they are treated like built-in operators of the
|
||||
language.
|
||||
|
||||
*/
|
||||
package callgraph
|
||||
package callgraph // import "golang.org/x/tools/go/callgraph"
|
||||
|
||||
// TODO(adonovan): add a function to eliminate wrappers from the
|
||||
// callgraph, preserving topology.
|
||||
|
@ -17,7 +17,7 @@
|
||||
// and all concrete types are put into interfaces, it is sound to run on
|
||||
// partial programs, such as libraries without a main or test function.
|
||||
//
|
||||
package cha
|
||||
package cha // import "golang.org/x/tools/go/callgraph/cha"
|
||||
|
||||
import (
|
||||
"golang.org/x/tools/go/callgraph"
|
||||
|
@ -40,7 +40,7 @@
|
||||
// cmd/callgraph tool on its own source takes ~2.1s for RTA and ~5.4s
|
||||
// for points-to analysis.
|
||||
//
|
||||
package rta
|
||||
package rta // import "golang.org/x/tools/go/callgraph/rta"
|
||||
|
||||
// TODO(adonovan): test it by connecting it to the interpreter and
|
||||
// replacing all "unreachable" functions by a special intrinsic, and
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Package static computes the call graph of a Go program containing
|
||||
// only static call edges.
|
||||
package static
|
||||
package static // import "golang.org/x/tools/go/callgraph/static"
|
||||
|
||||
import (
|
||||
"golang.org/x/tools/go/callgraph"
|
||||
|
@ -11,7 +11,7 @@
|
||||
// values produce unknown values unless specified
|
||||
// otherwise.
|
||||
//
|
||||
package exact
|
||||
package exact // import "golang.org/x/tools/go/exact"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package gccgoimporter implements Import for gccgo-generated object files.
|
||||
package gccgoimporter
|
||||
package gccgoimporter // import "golang.org/x/tools/go/gccgoimporter"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package gcimporter implements Import for gc-generated object files.
|
||||
// Importing this package installs Import as go/types.DefaultImport.
|
||||
package gcimporter
|
||||
package gcimporter // import "golang.org/x/tools/go/gcimporter"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -7,7 +7,7 @@
|
||||
// by R. Griesemer, Technical Report 156, ETH Zürich, 1991.
|
||||
|
||||
// package importer implements an exporter and importer for Go export data.
|
||||
package importer
|
||||
package importer // import "golang.org/x/tools/go/importer"
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
@ -73,7 +73,7 @@
|
||||
// DEPENDENCY is a package loaded to satisfy an import in an initial
|
||||
// package or another dependency.
|
||||
//
|
||||
package loader
|
||||
package loader // import "golang.org/x/tools/go/loader"
|
||||
|
||||
// 'go test', in-package test files, and import cycles
|
||||
// ---------------------------------------------------
|
||||
|
@ -607,4 +607,4 @@ ACM, New York, NY, USA, 47-56. DOI=10.1145/349299.349310
|
||||
http://doi.acm.org/10.1145/349299.349310
|
||||
|
||||
*/
|
||||
package pointer
|
||||
package pointer // import "golang.org/x/tools/go/pointer"
|
||||
|
@ -120,4 +120,4 @@
|
||||
// domains of source locations, ast.Nodes, types.Objects,
|
||||
// ssa.Values/Instructions.
|
||||
//
|
||||
package ssa
|
||||
package ssa // import "golang.org/x/tools/go/ssa"
|
||||
|
@ -42,7 +42,7 @@
|
||||
//
|
||||
// * os.Exit is implemented using panic, causing deferred functions to
|
||||
// run.
|
||||
package interp
|
||||
package interp // import "golang.org/x/tools/go/ssa/interp"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ssautil
|
||||
package ssautil // import "golang.org/x/tools/go/ssa/ssautil"
|
||||
|
||||
import "golang.org/x/tools/go/ssa"
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
// and checks for compliance with the language specification.
|
||||
// Use Info.Types[expr].Type for the results of type inference.
|
||||
//
|
||||
package types
|
||||
package types // import "golang.org/x/tools/go/types"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package typeutil defines various utilities for types, such as Map,
|
||||
// a mapping from types.Type to interface{} values.
|
||||
package typeutil
|
||||
package typeutil // import "golang.org/x/tools/go/types/typeutil"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package vcs
|
||||
package vcs // import "golang.org/x/tools/go/vcs"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -40,7 +40,7 @@
|
||||
// location is highlighted in red and hover text provides the compiler
|
||||
// error message.
|
||||
//
|
||||
package analysis
|
||||
package analysis // import "golang.org/x/tools/godoc/analysis"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
// This package comment will evolve over time as this package splits
|
||||
// into smaller pieces.
|
||||
package godoc
|
||||
package godoc // import "golang.org/x/tools/godoc"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Package redirect provides hooks to register HTTP handlers that redirect old
|
||||
// godoc paths to their new equivalents and assist in accessing the issue
|
||||
// tracker, wiki, code review system, etc.
|
||||
package redirect
|
||||
package redirect // import "golang.org/x/tools/godoc/redirect"
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
@ -5,4 +5,4 @@
|
||||
// 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
|
||||
// golang.org/x/tools/godoc/vfs/mapfs.
|
||||
package static
|
||||
package static // import "golang.org/x/tools/godoc/static"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package util contains utility types and functions for godoc.
|
||||
package util
|
||||
package util // import "golang.org/x/tools/godoc/util"
|
||||
|
||||
import (
|
||||
pathpkg "path"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package gatefs provides an implementation of the FileSystem
|
||||
// interface that wraps another FileSystem and limits its concurrency.
|
||||
package gatefs
|
||||
package gatefs // import "golang.org/x/tools/godoc/vfs/gatefs"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package httpfs implements http.FileSystem using a godoc vfs.FileSystem.
|
||||
package httpfs
|
||||
package httpfs // import "golang.org/x/tools/godoc/vfs/httpfs"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package mapfs file provides an implementation of the FileSystem
|
||||
// interface based on the contents of a map[string]string.
|
||||
package mapfs
|
||||
package mapfs // import "golang.org/x/tools/godoc/vfs/mapfs"
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package vfs defines types for abstract file system access and provides an
|
||||
// implementation accessing the file system of the underlying OS.
|
||||
package vfs
|
||||
package vfs // import "golang.org/x/tools/godoc/vfs"
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -15,7 +15,7 @@
|
||||
// like absolute paths w/o a leading '/'; i.e., the paths are considered
|
||||
// relative to the root of the file system.
|
||||
// - All path arguments to file system methods must be absolute paths.
|
||||
package zipfs
|
||||
package zipfs // import "golang.org/x/tools/godoc/vfs/zipfs"
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package imports implements a Go pretty-printer (like package "go/format")
|
||||
// that also adds or removes import statements as necessary.
|
||||
package imports
|
||||
package imports // import "golang.org/x/tools/imports"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -8,7 +8,7 @@
|
||||
// http://golang.org/s/oracle-design
|
||||
// http://golang.org/s/oracle-user-manual
|
||||
//
|
||||
package oracle
|
||||
package oracle // import "golang.org/x/tools/oracle"
|
||||
|
||||
// This file defines oracle.Query, the entry point for the oracle tool.
|
||||
// The actual executable is defined in cmd/oracle.
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Package playground registers HTTP handlers at "/compile" and "/share" that
|
||||
// proxy requests to the golang.org playground service.
|
||||
// This package may be used unaltered on App Engine.
|
||||
package playground
|
||||
package playground // import "golang.org/x/tools/playground"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -11,7 +11,7 @@
|
||||
// The wire format is JSON and is described by the Message type.
|
||||
//
|
||||
// This will not run on App Engine as WebSockets are not supported there.
|
||||
package socket
|
||||
package socket // import "golang.org/x/tools/playground/socket"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -202,4 +202,4 @@ It is your responsibilty to make sure the included HTML is valid and safe.
|
||||
.html file.html
|
||||
|
||||
*/
|
||||
package present
|
||||
package present // import "golang.org/x/tools/present"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Package eg implements the example-based refactoring tool whose
|
||||
// command-line is defined in golang.org/x/tools/cmd/eg.
|
||||
package eg
|
||||
package eg // import "golang.org/x/tools/refactor/eg"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// Package importgraph computes the forward and reverse import
|
||||
// dependency graphs for all packages in a Go workspace.
|
||||
package importgraph
|
||||
package importgraph // import "golang.org/x/tools/refactor/importgraph"
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
|
@ -9,7 +9,7 @@
|
||||
//
|
||||
// THIS INTERFACE IS EXPERIMENTAL AND MAY CHANGE OR BE REMOVED IN FUTURE.
|
||||
//
|
||||
package lexical
|
||||
package lexical // import "golang.org/x/tools/refactor/lexical"
|
||||
|
||||
// OVERVIEW
|
||||
//
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Package rename contains the implementation of the 'gorename' command
|
||||
// whose main function is in golang.org/x/tools/refactor/rename.
|
||||
// See that package for the command documentation.
|
||||
package rename
|
||||
package rename // import "golang.org/x/tools/refactor/rename"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -15,7 +15,7 @@
|
||||
// since it is computing it anyway, and it is robust for ill-typed
|
||||
// inputs, which this package is not.
|
||||
//
|
||||
package satisfy
|
||||
package satisfy // import "golang.org/x/tools/refactor/satisfy"
|
||||
|
||||
// NOTES:
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user