Skip to content

Instantly share code, notes, and snippets.

@wlynch
Created December 26, 2019 17:21
Show Gist options
  • Save wlynch/325293bc3fbc488d3b3d319f3a93bbea to your computer and use it in GitHub Desktop.
Save wlynch/325293bc3fbc488d3b3d319f3a93bbea to your computer and use it in GitHub Desktop.
Vendor dependency problem
package main
import (
"github.com/jenkins-x/go-scm/scm"
"github.com/tektoncd/pipeline/pkg/pullrequest"
)
func main() {
r, _ := pullrequest.FromDisk("/tmp/pr")
for _, c := range r.Comments {
r.Comments = append(r.Comments, &scm.Comment{
Body: "Asdf",
})
}
}
$ go build .
# _/tmp/dep-test
./main.go:16:22: cannot use &"github.com/jenkins-x/go-scm/scm".Comment literal (type *"github.com/jenkins-x/go-scm/scm".Comment) as type *"github.com/tektoncd/pipeline/vendor/github.com/jenkins-x/go-scm/scm".Comment in append
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment