Skip to content

Commit

Permalink
add example build info data
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobgy committed Aug 15, 2021
1 parent 1fb170d commit 109e9bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v2/third_party/go/runtime/debug/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ type Module struct {
}

func parseBuildInfo(data string) (*BuildInfo, bool) {
// Example data (note, separators are \t):
//
// tests/modules/cli02/main: go1.16.5
// path github.com/google/go-licenses/v2/tests/modules/cli02
// mod github.com/google/go-licenses/v2/tests/modules/cli02 (devel)
// dep github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
// dep github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
// dep github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
// dep golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
const (
pathLine = "\tpath\t"
modLine = "\tmod\t"
Expand Down

0 comments on commit 109e9bd

Please sign in to comment.