Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion depaware-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
// See https://github.com/tailscale/depaware
package main

import "github.com/tailscale/depaware/depaware"
import (
"github.com/tailscale/depaware/depaware"
)

func main() {
depaware.Main()
Expand Down
10 changes: 6 additions & 4 deletions depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ github.com/tailscale/depaware dependencies: (generated by github.com/tailscale/d
github.com/tailscale/depaware/depaware from github.com/tailscale/depaware
golang.org/x/mod/module from golang.org/x/tools/internal/imports
golang.org/x/mod/semver from golang.org/x/mod/module+
golang.org/x/tools/go/ast/astutil from golang.org/x/tools/internal/imports
golang.org/x/tools/go/ast/astutil from golang.org/x/tools/internal/imports+
golang.org/x/tools/go/gcexportdata from golang.org/x/tools/go/packages
golang.org/x/tools/go/packages from github.com/tailscale/depaware/depaware
golang.org/x/tools/imports from github.com/tailscale/depaware/depaware
Expand All @@ -22,21 +22,23 @@ github.com/tailscale/depaware dependencies: (generated by github.com/tailscale/d
encoding from encoding/json
encoding/base64 from encoding/json
encoding/binary from encoding/base64+
encoding/json from golang.org/x/tools/go/internal/packagesdriver+
encoding/json from golang.org/x/tools/go/packages+
errors from bufio+
flag from github.com/tailscale/depaware/depaware
fmt from encoding/json+
go/ast from go/build+
go/build from golang.org/x/tools/go/internal/gcimporter+
go/build/constraint from go/build+
go/constant from go/types+
go/doc from go/build
go/format from golang.org/x/tools/internal/imports
go/format from golang.org/x/tools/internal/imports+
go/parser from go/build+
go/printer from go/format+
go/scanner from go/ast+
go/token from go/ast+
go/types from golang.org/x/tools/go/gcexportdata+
io from bufio+
io/fs from go/build+
io/ioutil from github.com/tailscale/depaware/depaware+
log from github.com/tailscale/depaware/depaware+
math from encoding/binary+
Expand All @@ -45,7 +47,7 @@ github.com/tailscale/depaware dependencies: (generated by github.com/tailscale/d
math/rand from math/big
net/url from text/template
os from flag+
os/exec from go/build+
os/exec from golang.org/x/tools/go/packages+
path from go/build+
path/filepath from github.com/tailscale/depaware/depaware+
reflect from encoding/binary+
Expand Down
16 changes: 13 additions & 3 deletions depaware/depaware.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ import (
)

var (
check = flag.Bool("check", false, "if true, check whether dependencies match the depaware.txt file")
update = flag.Bool("update", false, "if true, update the depaware.txt file")
osList = flag.String("goos", "linux,darwin,windows", "comma-separated list of GOOS values")
check = flag.Bool("check", false, "if true, check whether dependencies match the depaware.txt file")
update = flag.Bool("update", false, "if true, update the depaware.txt file")
dumpSrc = flag.Bool("dumpsrc", false, "if non-empty, dump the source of package")
osList = flag.String("goos", "linux,darwin,windows", "comma-separated list of GOOS values")
)

func Main() {
flag.Parse()
if *dumpSrc {
if *check || *update {
log.Fatalf("-check and -update can't be use with -dumpsrc")
}
}
if *check && *update {
log.Fatalf("-check and -update can't be used together")
}
Expand All @@ -50,6 +56,10 @@ func Main() {
}
}
for i, pkg := range ipaths {
if *dumpSrc {
dumpSource(pkg)
continue
}
process(pkg)
// If we're printing to stdout, and there are more packages to come,
// add an extra newline.
Expand Down
Loading