Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Add importer for govendor #815

Merged
merged 6 commits into from
Nov 26, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
internal/importers: add govendor importer
Add vendor.json examples for govendor corner cases.

Add first integration test case
  • Loading branch information
Brendan Munro authored and carolynvs committed Nov 15, 2017
commit 90a984dd5fea2ea36d277fd525a2ac7bbdf70401
25 changes: 25 additions & 0 deletions cmd/dep/testdata/govendor/vendor-sub-pkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"comment": "",
"ignore": "test",
"package": [
{
"checksumSHA1": "c+MCTe4HOVzNBjFpjmPYWFSs06U=",
"path": "github.com/sdboyer/deptest",
"revision": "e1b5acf7f78e07bc0a8e51121ca0c7e174975d7e",
"revisionTime": "2017-07-15T19:32:19Z"
},
{
"checksumSHA1": "cp+gzxyVhoM8sZWLPrsigvpdDuc=",
"path": "github.com/sdboyer/deptest/floats",
"revision": "e1b5acf7f78e07bc0a8e51121ca0c7e174975d7e",
"revisionTime": "2017-07-15T19:32:19Z"
},
{
"checksumSHA1": "5yiF57bPBKmLr6AFDDxfTmWYZJ4=",
"path": "github.com/sdboyer/deptest/strings",
"revision": "e1b5acf7f78e07bc0a8e51121ca0c7e174975d7e",
"revisionTime": "2017-07-15T19:32:19Z"
}
],
"rootPath": "github.com/golang/notexist"
}
21 changes: 21 additions & 0 deletions cmd/dep/testdata/govendor/vendor-vendored-dep.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"comment": "",
"ignore": "test",
"package": [
{
"checksumSHA1": "q6es/GCwizh2GbLTKWWj8bB6Lc8=",
"origin": "github.com/sdboyer/deptest/vendor/github.com/sdboyer/coolint",
"path": "github.com/sdboyer/coolint",
"revision": "a920fd05db2031ad1ba94f62035fab5def190141",
"revisionTime": "2017-07-15T19:22:11Z"
},
{
"checksumSHA1": "c+MCTe4HOVzNBjFpjmPYWFSs06U=",
"path": "github.com/sdboyer/deptest",
"revision": "a920fd05db2031ad1ba94f62035fab5def190141",
"revisionTime": "2017-07-15T19:22:11Z"
}
],
"rootPath": "github.com/golang/notexist"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Import govendor config in vendor dir.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignored = ["github.com/sdboyer/dep-test","github.com/golang/notexist/samples"]

[[constraint]]
name = "github.com/sdboyer/deptestdos"
version = "2.0.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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.

package main

import (
"fmt"

"github.com/sdboyer/deptestdos"
)

func main() {
var x deptestdos.Bar
fmt.Println(x)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2016 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.

package samples

import dt "github.com/carolynvs/go-dep-test"

func Sample1() int {
var x = dt.Thing
return x
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"comment": "",
"ignore": "test github.com/sdboyer/dep-test",
"package": [
{
"checksumSHA1": "4R6TQcq0/gI/I2kKeUunuO/pEec=",
"origin": "github.com/carolynvs/deptest",
"path": "github.com/sdboyer/deptest",
"revision": "3f4c3bea144e112a69bbe5d8d01c1b09a544253f",
"revisionTime": "2017-02-22T03:31:47Z"
},
{
"checksumSHA1": "96YwrJjpE07ENey/eDWWnCWKQOw=",
"path": "github.com/sdboyer/deptestdos",
"revision": "5c607206be5decd28e6263ffffdcee067266015e",
"revisionTime": "2017-02-22T03:34:58Z",
"version": "v2",
"versionExact": "v2.0.0"
}
],
"rootPath": "github.com/golang/notexist"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"commands": [
["init", "-no-examples", "-gopath"]
],
"error-expected": "",
"gopath-initial": {
"github.com/sdboyer/deptest": "3f4c3bea144e112a69bbe5d8d01c1b09a544253f",
"github.com/sdboyer/deptestdos": "5c607206be5decd28e6263ffffdcee067266015e"
},
"vendor-final": [
"github.com/sdboyer/deptest",
"github.com/sdboyer/deptestdos"
]
}