Skip to content

Commit

Permalink
goversion: rewrite on top of cmd/go/internal/version
Browse files Browse the repository at this point in the history
Imported the cmd/go/internal/version implementation at
c32140fa94cfc51a2152855825f57e27ae3ba133, and restored Symbols and
TextRange to implement the gccgo and crypto checks.

It looks like the amd64 matching had broken, but it should be more
stable to just track what we do upstream with minimal modifications, so
I replaced the core mechanism rather than fixing the matcher.

Fixes rsc#14
Fixes rsc#12
Fixes rsc#11
Fixes rsc#7
Closes rsc#13
Closes rsc#9
  • Loading branch information
FiloSottile committed Dec 15, 2020
1 parent 597212e commit 967a33b
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 588 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Goversion scans inside of tar or gzipped tar archives that it finds (named
The `-crypto` flag causes goversion to print additional information about the
crypto libraries linked into each executable.

The -m flag causes goversion to print the list of modules
The `-m` flag causes goversion to print the list of modules
found in the executable, along with version information.

The -mh flag causes goversion to print the list of modules
The `-mh` flag causes goversion to print the list of modules
found in the executable, along with version and hash information.

The `-v` flag causes goversion to print information about every file it
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module rsc.io/goversion

go 1.14
4 changes: 0 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ var (
verbose = flag.Bool("v", false, "print verbose information")
)

func init() {
flag.BoolVar(&version.DebugMatch, "d", version.DebugMatch, "print debug information")
}

func usage() {
fmt.Fprintf(os.Stderr, "usage: goversion [-crypto] [-v] path...\n")
flag.PrintDefaults()
Expand Down
349 changes: 0 additions & 349 deletions version/asm.go

This file was deleted.

Loading

0 comments on commit 967a33b

Please sign in to comment.