Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: No // indirect dependency for imports in example files #28216

Closed
flibustenet opened this issue Oct 15, 2018 · 2 comments
Closed

cmd/go: No // indirect dependency for imports in example files #28216

flibustenet opened this issue Oct 15, 2018 · 2 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@flibustenet
Copy link

What version of Go are you using (go version)?

go 1.11.1

What operating system and processor architecture are you using (go env)?

linux amd64

What did you do?

I import github.com/go-ole/go-ole in my app
This lib currently has no go.mod file and import github.com/gonuts/commander in an example file https://github.com/go-ole/go-ole/blob/master/example/itunes/itunes.go

I run go mod tidy in my app

package main

import (
	"fmt"

	ole "github.com/go-ole/go-ole"
)

func main() {
	fmt.Println(ole.VT_EMPTY)

}

What did you expect to see?

module t

require github.com/go-ole/go-ole v1.2.1
require github.com/gonuts/commander v0.1.0 // indirect

What did you see instead?

module t

require github.com/go-ole/go-ole v1.2.1

No line with require github.com/gonuts/commander v0.1.0 // indirect

@FiloSottile FiloSottile added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Oct 15, 2018
@FiloSottile FiloSottile added this to the Go1.12 milestone Oct 15, 2018
@FiloSottile
Copy link
Contributor

/cc @bcmills

@bcmills
Copy link
Contributor

bcmills commented Oct 24, 2018

The package github.com/go-ole/go-ole doesn't import go-ole/example/itunes, so github.com/gonuts/commander isn't in the package-import graph of your module. That's why go mod tidy doesn't try to resolve it, and why it doesn't add a requirement for it.

@bcmills bcmills closed this as completed Oct 24, 2018
@golang golang locked and limited conversation to collaborators Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants