Skip to content

cmd/go: add 'require test' section to go.mod #26913

Closed
@OneOfOne

Description

@OneOfOne

Please answer these questions before submitting your issue. Thanks!

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

go version devel +479da24aac 2018-08-10 00:47:31 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

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

Linux/amd64

What did you do?

cd $GOPATH/github.com/OneOfOne/xxhash
gotip mod tidy

What did you expect to see?

● cat go.mod
module github.com/OneOfOne/xxhash

What did you see instead?

module github.com/OneOfOne/xxhash

require (
	github.com/cespare/xxhash v1.0.0
	github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 // indirect
)

Those 2 deps are only used in *_test.go files.

This isn't a bug really but more of a feature request, is there any way to split those sections into require (...) and require test (...)?

Without that split, go get -t is pretty much meaningless.

If there's interest, I'd like to take a stab at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions