Commit 94e6d3de authored by Russ Cox's avatar Russ Cox

cmd/dist: change mkdeps to be more merge-friendly

In addition to the obvious formatting change, this also drops
from deps.go any indirect dependencies, so that when you add
a new import to one package, the resulting diff only affects that
one package, not every package that imports that package
directly or indirectly. That makes the file a bit easier to understand,
if you need to debug it or deal with a possible merge conflict.

The code to trim the import lists (but not too much) was more
than I wanted to do in shell, so I rewrote mkdeps in Go.

The shell script is left behind for backwards-compatibility with
people who have learned to run ./mkdeps.bash (or documentation
suggesting the same).

Change-Id: I0bf27b5b27d0440e11ea830b00735c73f58eae03
Reviewed-on: https://go-review.googlesource.com/67650Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent 70258cc5
......@@ -3,92 +3,867 @@
package main
var builddeps = map[string][]string{
"bufio": {"bytes", "errors", "internal/cpu", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"bytes": {"errors", "internal/cpu", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"cmd/go/internal/base": {"bufio", "bytes", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/bug": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/envcmd", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/web", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding", "encoding/base64", "encoding/binary", "encoding/json", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/buildid": {"bufio", "bytes", "cmd/go/internal/cfg", "cmd/internal/objabi", "compress/flate", "compress/zlib", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/cfg": {"bufio", "bytes", "cmd/internal/objabi", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/clean": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/cmdflag": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/doc": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/envcmd": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding", "encoding/base64", "encoding/binary", "encoding/json", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/fix": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/internal/objabi", "compress/flate", "compress/zlib", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/fmtcmd": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/internal/objabi", "compress/flate", "compress/zlib", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/generate": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/get": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/web", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding", "encoding/base64", "encoding/binary", "encoding/json", "encoding/xml", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/singleflight", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/help": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/list": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding", "encoding/base64", "encoding/binary", "encoding/json", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/load": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "compress/flate", "compress/zlib", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/run": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/str": {"bytes", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/test": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/cmdflag", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/tool": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/version": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/cfg", "cmd/go/internal/str", "cmd/internal/objabi", "context", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/vet": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/cmdflag", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/go/internal/web": {"errors", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic"},
"cmd/go/internal/work": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/load", "cmd/go/internal/str", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding/binary", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"cmd/internal/objabi": {"errors", "flag", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "log", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"compress/flate": {"bufio", "bytes", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "math/bits", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"compress/zlib": {"bufio", "bytes", "compress/flate", "errors", "fmt", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "math/bits", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"container/heap": {"errors", "internal/cpu", "internal/race", "math", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"context": {"errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"crypto": {"errors", "hash", "internal/cpu", "internal/race", "io", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode/utf8"},
"crypto/sha1": {"crypto", "errors", "hash", "internal/cpu", "internal/race", "io", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode/utf8"},
"debug/dwarf": {"encoding/binary", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"debug/elf": {"bufio", "bytes", "compress/flate", "compress/zlib", "debug/dwarf", "encoding/binary", "errors", "fmt", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "math/bits", "os", "path", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"debug/macho": {"bytes", "debug/dwarf", "encoding/binary", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"encoding": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"encoding/base64": {"errors", "internal/cpu", "internal/race", "io", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode/utf8"},
"encoding/binary": {"errors", "internal/cpu", "internal/race", "io", "math", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"encoding/json": {"bytes", "encoding", "encoding/base64", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"encoding/xml": {"bufio", "bytes", "encoding", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"errors": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"flag": {"errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"fmt": {"errors", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/ast": {"bytes", "errors", "fmt", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/build": {"bufio", "bytes", "errors", "fmt", "go/ast", "go/doc", "go/parser", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "net/url", "os", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/doc": {"bytes", "errors", "fmt", "go/ast", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "math", "net/url", "os", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/parser": {"bytes", "errors", "fmt", "go/ast", "go/scanner", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/scanner": {"bytes", "errors", "fmt", "go/token", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"go/token": {"errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"hash": {"errors", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic"},
"hash/adler32": {"errors", "hash", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic"},
"internal/cpu": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"internal/poll": {"errors", "internal/race", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "time", "unicode/utf16", "unicode/utf8"},
"internal/race": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"internal/singleflight": {"internal/race", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic"},
"internal/syscall/windows": {"errors", "internal/race", "internal/syscall/windows/sysdll", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "unicode/utf16"},
"internal/syscall/windows/registry": {"errors", "internal/race", "internal/syscall/windows/sysdll", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "unicode/utf16"},
"internal/syscall/windows/sysdll": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"io": {"errors", "internal/race", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic"},
"io/ioutil": {"bytes", "errors", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"log": {"errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"math": {"internal/cpu", "runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"math/bits": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"net/url": {"bytes", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"os": {"errors", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "time", "unicode/utf16", "unicode/utf8"},
"os/exec": {"bytes", "context", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"os/signal": {"errors", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "os", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "time", "unicode/utf16", "unicode/utf8"},
"path": {"errors", "internal/cpu", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"path/filepath": {"errors", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"reflect": {"errors", "internal/cpu", "internal/race", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"regexp": {"bytes", "errors", "internal/cpu", "internal/race", "io", "math", "reflect", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"regexp/syntax": {"bytes", "errors", "internal/cpu", "internal/race", "io", "math", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"runtime": {"runtime/internal/atomic", "runtime/internal/sys"},
"runtime/internal/atomic": {"runtime/internal/sys"},
"runtime/internal/sys": {},
"sort": {"errors", "internal/cpu", "internal/race", "math", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"strconv": {"errors", "internal/cpu", "math", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "unicode/utf8"},
"strings": {"errors", "internal/cpu", "internal/race", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "unicode", "unicode/utf8"},
"sync": {"internal/race", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync/atomic"},
"sync/atomic": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"syscall": {"errors", "internal/race", "internal/syscall/windows/sysdll", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "unicode/utf16"},
"text/template": {"bytes", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "math", "net/url", "os", "path/filepath", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"text/template/parse": {"bytes", "errors", "fmt", "internal/cpu", "internal/poll", "internal/race", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "math", "os", "reflect", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "strconv", "strings", "sync", "sync/atomic", "syscall", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"time": {"errors", "internal/race", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sync", "sync/atomic", "syscall", "unicode/utf16"},
"unicode": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"unicode/utf16": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"unicode/utf8": {"runtime", "runtime/internal/atomic", "runtime/internal/sys"},
"cmd/go": {"bufio", "bytes", "cmd/go/internal/base", "cmd/go/internal/bug", "cmd/go/internal/buildid", "cmd/go/internal/cfg", "cmd/go/internal/clean", "cmd/go/internal/cmdflag", "cmd/go/internal/doc", "cmd/go/internal/envcmd", "cmd/go/internal/fix", "cmd/go/internal/fmtcmd", "cmd/go/internal/generate", "cmd/go/internal/get", "cmd/go/internal/help", "cmd/go/internal/list", "cmd/go/internal/load", "cmd/go/internal/run", "cmd/go/internal/str", "cmd/go/internal/test", "cmd/go/internal/tool", "cmd/go/internal/version", "cmd/go/internal/vet", "cmd/go/internal/web", "cmd/go/internal/work", "cmd/internal/objabi", "compress/flate", "compress/zlib", "container/heap", "context", "crypto", "crypto/sha1", "debug/dwarf", "debug/elf", "debug/macho", "encoding", "encoding/base64", "encoding/binary", "encoding/json", "encoding/xml", "errors", "flag", "fmt", "go/ast", "go/build", "go/doc", "go/parser", "go/scanner", "go/token", "hash", "hash/adler32", "internal/cpu", "internal/poll", "internal/race", "internal/singleflight", "internal/syscall/windows", "internal/syscall/windows/registry", "internal/syscall/windows/sysdll", "io", "io/ioutil", "log", "math", "math/bits", "net/url", "os", "os/exec", "os/signal", "path", "path/filepath", "reflect", "regexp", "regexp/syntax", "runtime", "runtime/internal/atomic", "runtime/internal/sys", "sort", "strconv", "strings", "sync", "sync/atomic", "syscall", "text/template", "text/template/parse", "time", "unicode", "unicode/utf16", "unicode/utf8"},
"bufio": {
"bytes", // bufio
"errors", // bufio
"io", // bufio
"unicode/utf8", // bufio
},
"bytes": {
"errors", // bytes
"io", // bytes
"unicode", // bytes
"unicode/utf8", // bytes
"internal/cpu", // bytes
},
"cmd/go": {
"cmd/go/internal/base", // cmd/go
"cmd/go/internal/bug", // cmd/go
"cmd/go/internal/cfg", // cmd/go
"cmd/go/internal/clean", // cmd/go
"cmd/go/internal/doc", // cmd/go
"cmd/go/internal/envcmd", // cmd/go
"cmd/go/internal/fix", // cmd/go
"cmd/go/internal/fmtcmd", // cmd/go
"cmd/go/internal/generate", // cmd/go
"cmd/go/internal/get", // cmd/go
"cmd/go/internal/help", // cmd/go
"cmd/go/internal/list", // cmd/go
"cmd/go/internal/run", // cmd/go
"cmd/go/internal/test", // cmd/go
"cmd/go/internal/tool", // cmd/go
"cmd/go/internal/version", // cmd/go
"cmd/go/internal/vet", // cmd/go
"cmd/go/internal/work", // cmd/go
"flag", // cmd/go
"fmt", // cmd/go
"log", // cmd/go
"os", // cmd/go
"path/filepath", // cmd/go
"runtime", // cmd/go
"strings", // cmd/go
},
"cmd/go/internal/base": {
"bytes", // cmd/go/internal/base
"cmd/go/internal/cfg", // cmd/go/internal/base
"cmd/go/internal/str", // cmd/go/internal/base
"errors", // cmd/go/internal/base
"flag", // cmd/go/internal/base
"fmt", // cmd/go/internal/base
"go/build", // cmd/go/internal/base
"go/scanner", // cmd/go/internal/base
"log", // cmd/go/internal/base
"os", // cmd/go/internal/base
"os/exec", // cmd/go/internal/base
"os/signal", // cmd/go/internal/base
"path/filepath", // cmd/go/internal/base
"runtime", // cmd/go/internal/base
"strings", // cmd/go/internal/base
"sync", // cmd/go/internal/base
"syscall", // cmd/go/internal/base
},
"cmd/go/internal/bug": {
"bytes", // cmd/go/internal/bug
"cmd/go/internal/base", // cmd/go/internal/bug
"cmd/go/internal/cfg", // cmd/go/internal/bug
"cmd/go/internal/envcmd", // cmd/go/internal/bug
"cmd/go/internal/web", // cmd/go/internal/bug
"fmt", // cmd/go/internal/bug
"io", // cmd/go/internal/bug
"io/ioutil", // cmd/go/internal/bug
"os", // cmd/go/internal/bug
"os/exec", // cmd/go/internal/bug
"path/filepath", // cmd/go/internal/bug
"regexp", // cmd/go/internal/bug
"runtime", // cmd/go/internal/bug
"strings", // cmd/go/internal/bug
},
"cmd/go/internal/buildid": {
"bytes", // cmd/go/internal/buildid
"cmd/go/internal/cfg", // cmd/go/internal/buildid
"debug/elf", // cmd/go/internal/buildid
"debug/macho", // cmd/go/internal/buildid
"encoding/binary", // cmd/go/internal/buildid
"fmt", // cmd/go/internal/buildid
"io", // cmd/go/internal/buildid
"os", // cmd/go/internal/buildid
"strconv", // cmd/go/internal/buildid
"strings", // cmd/go/internal/buildid
},
"cmd/go/internal/cfg": {
"cmd/internal/objabi", // cmd/go/internal/cfg
"fmt", // cmd/go/internal/cfg
"go/build", // cmd/go/internal/cfg
"os", // cmd/go/internal/cfg
"path/filepath", // cmd/go/internal/cfg
"runtime", // cmd/go/internal/cfg
},
"cmd/go/internal/clean": {
"cmd/go/internal/base", // cmd/go/internal/clean
"cmd/go/internal/cfg", // cmd/go/internal/clean
"cmd/go/internal/load", // cmd/go/internal/clean
"cmd/go/internal/work", // cmd/go/internal/clean
"fmt", // cmd/go/internal/clean
"io/ioutil", // cmd/go/internal/clean
"os", // cmd/go/internal/clean
"path/filepath", // cmd/go/internal/clean
"strings", // cmd/go/internal/clean
},
"cmd/go/internal/cmdflag": {
"cmd/go/internal/base", // cmd/go/internal/cmdflag
"flag", // cmd/go/internal/cmdflag
"fmt", // cmd/go/internal/cmdflag
"os", // cmd/go/internal/cmdflag
"strconv", // cmd/go/internal/cmdflag
"strings", // cmd/go/internal/cmdflag
},
"cmd/go/internal/doc": {
"cmd/go/internal/base", // cmd/go/internal/doc
"cmd/go/internal/cfg", // cmd/go/internal/doc
},
"cmd/go/internal/envcmd": {
"cmd/go/internal/base", // cmd/go/internal/envcmd
"cmd/go/internal/cfg", // cmd/go/internal/envcmd
"cmd/go/internal/load", // cmd/go/internal/envcmd
"cmd/go/internal/work", // cmd/go/internal/envcmd
"encoding/json", // cmd/go/internal/envcmd
"fmt", // cmd/go/internal/envcmd
"os", // cmd/go/internal/envcmd
"runtime", // cmd/go/internal/envcmd
"strings", // cmd/go/internal/envcmd
},
"cmd/go/internal/fix": {
"cmd/go/internal/base", // cmd/go/internal/fix
"cmd/go/internal/cfg", // cmd/go/internal/fix
"cmd/go/internal/load", // cmd/go/internal/fix
"cmd/go/internal/str", // cmd/go/internal/fix
},
"cmd/go/internal/fmtcmd": {
"cmd/go/internal/base", // cmd/go/internal/fmtcmd
"cmd/go/internal/cfg", // cmd/go/internal/fmtcmd
"cmd/go/internal/load", // cmd/go/internal/fmtcmd
"cmd/go/internal/str", // cmd/go/internal/fmtcmd
"os", // cmd/go/internal/fmtcmd
"path/filepath", // cmd/go/internal/fmtcmd
"runtime", // cmd/go/internal/fmtcmd
"sync", // cmd/go/internal/fmtcmd
},
"cmd/go/internal/generate": {
"bufio", // cmd/go/internal/generate
"bytes", // cmd/go/internal/generate
"cmd/go/internal/base", // cmd/go/internal/generate
"cmd/go/internal/cfg", // cmd/go/internal/generate
"cmd/go/internal/load", // cmd/go/internal/generate
"cmd/go/internal/work", // cmd/go/internal/generate
"fmt", // cmd/go/internal/generate
"io", // cmd/go/internal/generate
"log", // cmd/go/internal/generate
"os", // cmd/go/internal/generate
"os/exec", // cmd/go/internal/generate
"path/filepath", // cmd/go/internal/generate
"regexp", // cmd/go/internal/generate
"strconv", // cmd/go/internal/generate
"strings", // cmd/go/internal/generate
},
"cmd/go/internal/get": {
"bytes", // cmd/go/internal/get
"cmd/go/internal/base", // cmd/go/internal/get
"cmd/go/internal/cfg", // cmd/go/internal/get
"cmd/go/internal/load", // cmd/go/internal/get
"cmd/go/internal/str", // cmd/go/internal/get
"cmd/go/internal/web", // cmd/go/internal/get
"cmd/go/internal/work", // cmd/go/internal/get
"encoding/json", // cmd/go/internal/get
"encoding/xml", // cmd/go/internal/get
"errors", // cmd/go/internal/get
"fmt", // cmd/go/internal/get
"go/build", // cmd/go/internal/get
"internal/singleflight", // cmd/go/internal/get
"io", // cmd/go/internal/get
"log", // cmd/go/internal/get
"net/url", // cmd/go/internal/get
"os", // cmd/go/internal/get
"os/exec", // cmd/go/internal/get
"path/filepath", // cmd/go/internal/get
"regexp", // cmd/go/internal/get
"runtime", // cmd/go/internal/get
"strings", // cmd/go/internal/get
"sync", // cmd/go/internal/get
},
"cmd/go/internal/help": {
"bufio", // cmd/go/internal/help
"bytes", // cmd/go/internal/help
"cmd/go/internal/base", // cmd/go/internal/help
"fmt", // cmd/go/internal/help
"io", // cmd/go/internal/help
"os", // cmd/go/internal/help
"strings", // cmd/go/internal/help
"text/template", // cmd/go/internal/help
"unicode", // cmd/go/internal/help
"unicode/utf8", // cmd/go/internal/help
},
"cmd/go/internal/list": {
"bufio", // cmd/go/internal/list
"cmd/go/internal/base", // cmd/go/internal/list
"cmd/go/internal/cfg", // cmd/go/internal/list
"cmd/go/internal/load", // cmd/go/internal/list
"cmd/go/internal/work", // cmd/go/internal/list
"encoding/json", // cmd/go/internal/list
"go/build", // cmd/go/internal/list
"io", // cmd/go/internal/list
"os", // cmd/go/internal/list
"strings", // cmd/go/internal/list
"text/template", // cmd/go/internal/list
},
"cmd/go/internal/load": {
"cmd/go/internal/base", // cmd/go/internal/load
"cmd/go/internal/buildid", // cmd/go/internal/load
"cmd/go/internal/cfg", // cmd/go/internal/load
"cmd/go/internal/str", // cmd/go/internal/load
"crypto/sha1", // cmd/go/internal/load
"fmt", // cmd/go/internal/load
"go/build", // cmd/go/internal/load
"go/token", // cmd/go/internal/load
"io/ioutil", // cmd/go/internal/load
"log", // cmd/go/internal/load
"os", // cmd/go/internal/load
"path", // cmd/go/internal/load
"path/filepath", // cmd/go/internal/load
"regexp", // cmd/go/internal/load
"runtime", // cmd/go/internal/load
"sort", // cmd/go/internal/load
"strings", // cmd/go/internal/load
"unicode", // cmd/go/internal/load
},
"cmd/go/internal/run": {
"cmd/go/internal/base", // cmd/go/internal/run
"cmd/go/internal/cfg", // cmd/go/internal/run
"cmd/go/internal/load", // cmd/go/internal/run
"cmd/go/internal/str", // cmd/go/internal/run
"cmd/go/internal/work", // cmd/go/internal/run
"fmt", // cmd/go/internal/run
"os", // cmd/go/internal/run
"strings", // cmd/go/internal/run
},
"cmd/go/internal/str": {
"bytes", // cmd/go/internal/str
"fmt", // cmd/go/internal/str
"unicode", // cmd/go/internal/str
"unicode/utf8", // cmd/go/internal/str
},
"cmd/go/internal/test": {
"bytes", // cmd/go/internal/test
"cmd/go/internal/base", // cmd/go/internal/test
"cmd/go/internal/cfg", // cmd/go/internal/test
"cmd/go/internal/cmdflag", // cmd/go/internal/test
"cmd/go/internal/load", // cmd/go/internal/test
"cmd/go/internal/str", // cmd/go/internal/test
"cmd/go/internal/work", // cmd/go/internal/test
"errors", // cmd/go/internal/test
"flag", // cmd/go/internal/test
"fmt", // cmd/go/internal/test
"go/ast", // cmd/go/internal/test
"go/build", // cmd/go/internal/test
"go/doc", // cmd/go/internal/test
"go/parser", // cmd/go/internal/test
"go/token", // cmd/go/internal/test
"os", // cmd/go/internal/test
"os/exec", // cmd/go/internal/test
"path", // cmd/go/internal/test
"path/filepath", // cmd/go/internal/test
"regexp", // cmd/go/internal/test
"runtime", // cmd/go/internal/test
"sort", // cmd/go/internal/test
"strings", // cmd/go/internal/test
"text/template", // cmd/go/internal/test
"time", // cmd/go/internal/test
"unicode", // cmd/go/internal/test
"unicode/utf8", // cmd/go/internal/test
},
"cmd/go/internal/tool": {
"cmd/go/internal/base", // cmd/go/internal/tool
"cmd/go/internal/cfg", // cmd/go/internal/tool
"fmt", // cmd/go/internal/tool
"os", // cmd/go/internal/tool
"os/exec", // cmd/go/internal/tool
"sort", // cmd/go/internal/tool
"strings", // cmd/go/internal/tool
},
"cmd/go/internal/version": {
"cmd/go/internal/base", // cmd/go/internal/version
"fmt", // cmd/go/internal/version
"runtime", // cmd/go/internal/version
},
"cmd/go/internal/vet": {
"cmd/go/internal/base", // cmd/go/internal/vet
"cmd/go/internal/cfg", // cmd/go/internal/vet
"cmd/go/internal/cmdflag", // cmd/go/internal/vet
"cmd/go/internal/load", // cmd/go/internal/vet
"cmd/go/internal/str", // cmd/go/internal/vet
"cmd/go/internal/work", // cmd/go/internal/vet
"flag", // cmd/go/internal/vet
"fmt", // cmd/go/internal/vet
"os", // cmd/go/internal/vet
"path/filepath", // cmd/go/internal/vet
"strings", // cmd/go/internal/vet
},
"cmd/go/internal/web": {
"errors", // cmd/go/internal/web
"io", // cmd/go/internal/web
},
"cmd/go/internal/work": {
"bufio", // cmd/go/internal/work
"bytes", // cmd/go/internal/work
"cmd/go/internal/base", // cmd/go/internal/work
"cmd/go/internal/buildid", // cmd/go/internal/work
"cmd/go/internal/cfg", // cmd/go/internal/work
"cmd/go/internal/load", // cmd/go/internal/work
"cmd/go/internal/str", // cmd/go/internal/work
"container/heap", // cmd/go/internal/work
"debug/elf", // cmd/go/internal/work
"errors", // cmd/go/internal/work
"flag", // cmd/go/internal/work
"fmt", // cmd/go/internal/work
"go/build", // cmd/go/internal/work
"io", // cmd/go/internal/work
"io/ioutil", // cmd/go/internal/work
"log", // cmd/go/internal/work
"os", // cmd/go/internal/work
"os/exec", // cmd/go/internal/work
"path", // cmd/go/internal/work
"path/filepath", // cmd/go/internal/work
"regexp", // cmd/go/internal/work
"runtime", // cmd/go/internal/work
"strconv", // cmd/go/internal/work
"strings", // cmd/go/internal/work
"sync", // cmd/go/internal/work
"time", // cmd/go/internal/work
},
"cmd/internal/objabi": {
"flag", // cmd/internal/objabi
"fmt", // cmd/internal/objabi
"log", // cmd/internal/objabi
"os", // cmd/internal/objabi
"path/filepath", // cmd/internal/objabi
"runtime", // cmd/internal/objabi
"strconv", // cmd/internal/objabi
"strings", // cmd/internal/objabi
},
"compress/flate": {
"bufio", // compress/flate
"fmt", // compress/flate
"io", // compress/flate
"math", // compress/flate
"math/bits", // compress/flate
"sort", // compress/flate
"strconv", // compress/flate
"sync", // compress/flate
},
"compress/zlib": {
"bufio", // compress/zlib
"compress/flate", // compress/zlib
"errors", // compress/zlib
"fmt", // compress/zlib
"hash", // compress/zlib
"hash/adler32", // compress/zlib
"io", // compress/zlib
},
"container/heap": {
"sort", // container/heap
},
"context": {
"errors", // context
"fmt", // context
"reflect", // context
"sync", // context
"time", // context
},
"crypto": {
"hash", // crypto
"io", // crypto
"strconv", // crypto
},
"crypto/sha1": {
"crypto", // crypto/sha1
"hash", // crypto/sha1
"internal/cpu", // crypto/sha1
},
"debug/dwarf": {
"encoding/binary", // debug/dwarf
"errors", // debug/dwarf
"fmt", // debug/dwarf
"io", // debug/dwarf
"path", // debug/dwarf
"sort", // debug/dwarf
"strconv", // debug/dwarf
"strings", // debug/dwarf
},
"debug/elf": {
"bytes", // debug/elf
"compress/zlib", // debug/elf
"debug/dwarf", // debug/elf
"encoding/binary", // debug/elf
"errors", // debug/elf
"fmt", // debug/elf
"io", // debug/elf
"os", // debug/elf
"strconv", // debug/elf
"strings", // debug/elf
},
"debug/macho": {
"bytes", // debug/macho
"debug/dwarf", // debug/macho
"encoding/binary", // debug/macho
"fmt", // debug/macho
"io", // debug/macho
"os", // debug/macho
"strconv", // debug/macho
},
"encoding": {},
"encoding/base64": {
"io", // encoding/base64
"strconv", // encoding/base64
},
"encoding/binary": {
"errors", // encoding/binary
"io", // encoding/binary
"math", // encoding/binary
"reflect", // encoding/binary
},
"encoding/json": {
"bytes", // encoding/json
"encoding", // encoding/json
"encoding/base64", // encoding/json
"errors", // encoding/json
"fmt", // encoding/json
"io", // encoding/json
"math", // encoding/json
"reflect", // encoding/json
"runtime", // encoding/json
"sort", // encoding/json
"strconv", // encoding/json
"strings", // encoding/json
"sync", // encoding/json
"sync/atomic", // encoding/json
"unicode", // encoding/json
"unicode/utf16", // encoding/json
"unicode/utf8", // encoding/json
},
"encoding/xml": {
"bufio", // encoding/xml
"bytes", // encoding/xml
"encoding", // encoding/xml
"errors", // encoding/xml
"fmt", // encoding/xml
"io", // encoding/xml
"reflect", // encoding/xml
"strconv", // encoding/xml
"strings", // encoding/xml
"sync", // encoding/xml
"unicode", // encoding/xml
"unicode/utf8", // encoding/xml
},
"errors": {},
"flag": {
"errors", // flag
"fmt", // flag
"io", // flag
"os", // flag
"reflect", // flag
"sort", // flag
"strconv", // flag
"strings", // flag
"time", // flag
},
"fmt": {
"errors", // fmt
"io", // fmt
"math", // fmt
"os", // fmt
"reflect", // fmt
"strconv", // fmt
"sync", // fmt
"unicode/utf8", // fmt
},
"go/ast": {
"bytes", // go/ast
"fmt", // go/ast
"go/scanner", // go/ast
"go/token", // go/ast
"io", // go/ast
"os", // go/ast
"reflect", // go/ast
"sort", // go/ast
"strconv", // go/ast
"strings", // go/ast
"unicode", // go/ast
"unicode/utf8", // go/ast
},
"go/build": {
"bufio", // go/build
"bytes", // go/build
"errors", // go/build
"fmt", // go/build
"go/ast", // go/build
"go/doc", // go/build
"go/parser", // go/build
"go/token", // go/build
"io", // go/build
"io/ioutil", // go/build
"log", // go/build
"os", // go/build
"path", // go/build
"path/filepath", // go/build
"runtime", // go/build
"sort", // go/build
"strconv", // go/build
"strings", // go/build
"unicode", // go/build
"unicode/utf8", // go/build
},
"go/doc": {
"go/ast", // go/doc
"go/token", // go/doc
"io", // go/doc
"path", // go/doc
"regexp", // go/doc
"sort", // go/doc
"strconv", // go/doc
"strings", // go/doc
"text/template", // go/doc
"unicode", // go/doc
"unicode/utf8", // go/doc
},
"go/parser": {
"bytes", // go/parser
"errors", // go/parser
"fmt", // go/parser
"go/ast", // go/parser
"go/scanner", // go/parser
"go/token", // go/parser
"io", // go/parser
"io/ioutil", // go/parser
"os", // go/parser
"path/filepath", // go/parser
"strconv", // go/parser
"strings", // go/parser
"unicode", // go/parser
},
"go/scanner": {
"bytes", // go/scanner
"fmt", // go/scanner
"go/token", // go/scanner
"io", // go/scanner
"path/filepath", // go/scanner
"sort", // go/scanner
"strconv", // go/scanner
"unicode", // go/scanner
"unicode/utf8", // go/scanner
},
"go/token": {
"fmt", // go/token
"sort", // go/token
"strconv", // go/token
"sync", // go/token
},
"hash": {
"io", // hash
},
"hash/adler32": {
"hash", // hash/adler32
},
"internal/cpu": {},
"internal/poll": {
"errors", // internal/poll
"io", // internal/poll
"sync", // internal/poll
"sync/atomic", // internal/poll
"syscall", // internal/poll
"time", // internal/poll
"internal/race", // internal/poll
"runtime", // internal/poll
"unicode/utf16", // internal/poll
"unicode/utf8", // internal/poll
},
"internal/race": {},
"internal/singleflight": {
"sync", // internal/singleflight
},
"internal/syscall/windows": {
"internal/syscall/windows/sysdll", // internal/syscall/windows
"syscall", // internal/syscall/windows
},
"internal/syscall/windows/registry": {
"errors", // internal/syscall/windows/registry
"internal/syscall/windows/sysdll", // internal/syscall/windows/registry
"io", // internal/syscall/windows/registry
"syscall", // internal/syscall/windows/registry
"unicode/utf16", // internal/syscall/windows/registry
},
"internal/syscall/windows/sysdll": {},
"io": {
"errors", // io
"sync", // io
},
"io/ioutil": {
"bytes", // io/ioutil
"io", // io/ioutil
"os", // io/ioutil
"path/filepath", // io/ioutil
"sort", // io/ioutil
"strconv", // io/ioutil
"sync", // io/ioutil
"time", // io/ioutil
},
"log": {
"fmt", // log
"io", // log
"os", // log
"runtime", // log
"sync", // log
"time", // log
},
"math": {
"internal/cpu", // math
},
"math/bits": {},
"net/url": {
"bytes", // net/url
"errors", // net/url
"fmt", // net/url
"sort", // net/url
"strconv", // net/url
"strings", // net/url
},
"os": {
"errors", // os
"internal/poll", // os
"io", // os
"runtime", // os
"sync", // os
"sync/atomic", // os
"syscall", // os
"time", // os
"internal/syscall/windows", // os
"unicode/utf16", // os
},
"os/exec": {
"bytes", // os/exec
"context", // os/exec
"errors", // os/exec
"io", // os/exec
"os", // os/exec
"path/filepath", // os/exec
"runtime", // os/exec
"strconv", // os/exec
"strings", // os/exec
"sync", // os/exec
"syscall", // os/exec
},
"os/signal": {
"os", // os/signal
"sync", // os/signal
"syscall", // os/signal
},
"path": {
"errors", // path
"strings", // path
"unicode/utf8", // path
},
"path/filepath": {
"errors", // path/filepath
"os", // path/filepath
"runtime", // path/filepath
"sort", // path/filepath
"strings", // path/filepath
"unicode/utf8", // path/filepath
"syscall", // path/filepath
},
"reflect": {
"math", // reflect
"runtime", // reflect
"strconv", // reflect
"sync", // reflect
"unicode", // reflect
"unicode/utf8", // reflect
},
"regexp": {
"bytes", // regexp
"io", // regexp
"regexp/syntax", // regexp
"sort", // regexp
"strconv", // regexp
"strings", // regexp
"sync", // regexp
"unicode", // regexp
"unicode/utf8", // regexp
},
"regexp/syntax": {
"bytes", // regexp/syntax
"sort", // regexp/syntax
"strconv", // regexp/syntax
"strings", // regexp/syntax
"unicode", // regexp/syntax
"unicode/utf8", // regexp/syntax
},
"runtime": {
"runtime/internal/atomic", // runtime
"runtime/internal/sys", // runtime
},
"runtime/internal/atomic": {},
"runtime/internal/sys": {},
"sort": {
"reflect", // sort
},
"strconv": {
"errors", // strconv
"math", // strconv
"unicode/utf8", // strconv
},
"strings": {
"errors", // strings
"io", // strings
"unicode", // strings
"unicode/utf8", // strings
"internal/cpu", // strings
},
"sync": {
"internal/race", // sync
"runtime", // sync
"sync/atomic", // sync
},
"sync/atomic": {},
"syscall": {
"internal/race", // syscall
"runtime", // syscall
"sync", // syscall
"errors", // syscall
"internal/syscall/windows/sysdll", // syscall
"sync/atomic", // syscall
"unicode/utf16", // syscall
},
"text/template": {
"bytes", // text/template
"errors", // text/template
"fmt", // text/template
"io", // text/template
"io/ioutil", // text/template
"net/url", // text/template
"path/filepath", // text/template
"reflect", // text/template
"runtime", // text/template
"sort", // text/template
"strings", // text/template
"sync", // text/template
"text/template/parse", // text/template
"unicode", // text/template
"unicode/utf8", // text/template
},
"text/template/parse": {
"bytes", // text/template/parse
"fmt", // text/template/parse
"runtime", // text/template/parse
"strconv", // text/template/parse
"strings", // text/template/parse
"unicode", // text/template/parse
"unicode/utf8", // text/template/parse
},
"time": {
"errors", // time
"runtime", // time
"sync", // time
"syscall", // time
"internal/syscall/windows/registry", // time
},
"unicode": {},
"unicode/utf16": {},
"unicode/utf8": {},
}
......@@ -3,50 +3,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
output="$1"
if test -z "$output"; then
output=deps.go
fi
# We need to test enough GOOS/GOARCH combinations to pick up all the
# package dependencies.
gooslist="windows linux darwin solaris"
goarchlist="386 amd64 arm arm64 ppc64"
echo NOTE: errors about loading internal/syscall/windows are ok
# This script regenerates deps.go.
# The script used to do all the work, but now a Go program does.
# The script has been preserved so that people who learned to type
# ./mkdeps.bash don't have to relearn a new method.
# It's fine to run "go run mkdeps.go" directly instead.
deps_of() {
for goos in $gooslist
do
for goarch in $goarchlist
do
GOOS=$goos GOARCH=$goarch go list -tags cmd_go_bootstrap -f '{{range .Deps}}{{$.ImportPath}} {{.}}
{{end}}' $*
done
done | sort -u | grep . | grep -v ' unsafe$'
}
all="$(deps_of cmd/go | awk '{print $2}') cmd/go"
deps_of $all >tmp.all.deps
(
echo '// Code generated by mkdeps.bash; DO NOT EDIT.'
echo
echo 'package main'
echo
echo 'var builddeps = map[string][]string{'
for pkg in $all
do
echo -n "\"$pkg\": {"
for dep in $(awk -v pkg=$pkg '$1==pkg {print $2}' tmp.all.deps)
do
echo -n "\"$dep\","
done
echo '},'
done
echo '}'
) |gofmt >$output
rm -f tmp.all.deps
set -e
go run mkdeps.go -- "$@"
exit 0
// Copyright 2017 The Go 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 generates deps.go.
// Run as "go run mkdeps.go" or, to redirect the output, "go run mkdeps.go x.txt".
// +build ignore
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"sort"
"strings"
)
// We need to test enough GOOS/GOARCH combinations
// to find all the package dependencies of cmd/go on all systems.
var targetList = strings.Fields(`
linux/386
linux/amd64
windows/amd64
`)
func usage() {
fmt.Fprintf(os.Stderr, "usage: mkdeps [deps.go]\n")
os.Exit(2)
}
func main() {
log.SetPrefix("mkdeps: ")
log.SetFlags(0)
flag.Usage = usage
flag.Parse()
if flag.NArg() > 1 {
usage()
}
outfile := "deps.go"
if flag.NArg() == 1 {
outfile = flag.Arg(0)
}
_, deps := importsAndDepsOf("cmd/go")
all := deps["cmd/go"]
all = append(all, "cmd/go")
imports, deps := importsAndDepsOf(all...)
// Sort topologically, then by import path.
var topo []string
walked := make(map[string]bool)
var walk func(string)
walk = func(p string) {
if walked[p] {
return
}
walked[p] = true
sort.Strings(deps[p])
for _, d := range deps[p] {
walk(d)
}
topo = append(topo, p)
}
// We're only going to print imports, not deps,
// in hopes of making deps.go intelligible to people
// who need to debug it or attempt to resolve merge conflicts.
// For the most part, deps is just the transitive closure of imports,
// but sometimes there are implicit deps supplied by the go command
// that are not derivable from imports.
// Find those (if any) and copy them explicitly into imports.
for _, p := range topo {
for _, dp := range deps[p] {
found := false
for _, ip := range imports[p] {
if dp == ip || inList(deps[ip], dp) {
found = true
break
}
}
if !found {
imports[p] = append(imports[p], dp)
}
}
sort.Strings(imports[p])
}
sort.Strings(all)
// Print table.
var buf bytes.Buffer
fmt.Fprintf(&buf, "// Code generated by mkdeps.bash; DO NOT EDIT.\n\n")
fmt.Fprintf(&buf, "package main\n\n")
fmt.Fprintf(&buf, "var builddeps = map[string][]string{\n")
for _, p := range all {
if p == "unsafe" { // unsafe should not be built
continue
}
// We're printing a multiline format here to make the output more
// intelligible both to people and to merge tools.
// We put the name of the parent package as a comment on every line
// to keep a merge tool from applying the diff for one package
// to the dependency list for a different package.
// The extra blank line at the start stops any attempt by gofmt at
// lining up the slice literals from different packages,
// even if they are empty slices (on a single line with the key).
fmt.Fprintf(&buf, "\n\t%q: {\n", p)
for _, d := range imports[p] {
if d != "unsafe" {
fmt.Fprintf(&buf, "\t\t%q, // %s\n", d, p)
}
}
fmt.Fprintf(&buf, "\t},\n")
}
fmt.Fprintf(&buf, "\n}\n")
// Run the installed gofmt instead of using go/format,
// because, on the off chance they disagree,
// the installed gofmt binary is by definition the correct one.
cmd := exec.Command("gofmt")
cmd.Stdin = &buf
var out bytes.Buffer
cmd.Stdout = &out
if err := cmd.Run(); err != nil {
log.Fatalf("gofmt: %v", err)
}
if err := ioutil.WriteFile(outfile, out.Bytes(), 0666); err != nil {
log.Fatal(err)
}
}
func inList(xs []string, s string) bool {
for _, x := range xs {
if x == s {
return true
}
}
return false
}
// importsAndDepsOf returns two maps, one giving the imports for each package in pkgs,
// and one giving the dependencies for each package in pkgs.
// Both the keys and the entries in the value slices are full import paths.
func importsAndDepsOf(pkgs ...string) (map[string][]string, map[string][]string) {
imports := make(map[string][]string)
deps := make(map[string][]string)
for _, target := range targetList {
args := []string{"list", "-tags", "cmd_go_bootstrap", "-f", "{{range .Imports}}import {{$.ImportPath}} {{.}}\n{{end}}{{range .Deps}}dep {{$.ImportPath}} {{.}}\n{{end}}"}
args = append(args, pkgs...)
cmd := exec.Command("go", args...)
cmd.Env = append(os.Environ(), "GOOS="+t[0], "GOARCH="+t[1])
out, err := cmd.Output()
if err != nil {
log.Fatalf("GOOS=%s GOARCH=%s go list: %v", t[0], t[1], err)
}
helped := false
for _, line := range strings.Split(string(out), "\n") {
f := strings.Fields(line)
if len(f) != 3 {
continue
}
if f[0] == "import" && !inList(imports[f[1]], f[2]) {
helped = true
imports[f[1]] = append(imports[f[1]], f[2])
}
if f[0] == "dep" && !inList(deps[f[1]], f[2]) {
helped = true
deps[f[1]] = append(deps[f[1]], f[2])
}
}
if !helped {
fmt.Fprintf(os.Stderr, "mkdeps: note: %s did not contribute any new dependencies\n", target)
}
}
return imports, deps
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment