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: downloads dependencies of sources disconnected from the build #5257

Closed
masiulaniec opened this issue Apr 10, 2013 · 1 comment
Closed

Comments

@masiulaniec
Copy link

Stumbled on this when trying to add a program to a version control tree, but disconnect
it from go build ./...

% cat main.go
// +build ignore
package main

import _ "github.com/kr/pty"

func main() {}
% rm -rf $GOPATH/github.com/kr/pty
% rm -rf $GOPATH/pkg
% go get -v
github.com/kr/pty
_/private/tmp/test
% 

I was expecting:

% go get -v
% 

My setup:

% go version
go version go1.0.3
% go env GOOS
darwin
% go env GOARCH
amd64
%
@minux
Copy link
Member

minux commented Apr 10, 2013

Comment 1:

you need to place at least one blank line after the "// +build" line
or it will be treated as package document.

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants