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

Expect Gododir to be a valid go package (not command). #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GeertJohan
Copy link
Contributor

No description provided.

@GeertJohan
Copy link
Contributor Author

This implements the changes as described in #11
Existing usage of Gododir/Godofile.go should not break, unless Gododir/Godofile.go is a package main, in which case the user get's an error. Fixing is trivial (rename package, remove func main()).

@mgutz
Copy link

mgutz commented Jan 7, 2015

I apologize for not looking at this yet. I had a loong holiday. Will try to get to it this weekend.

@GeertJohan
Copy link
Contributor Author

Sure no problem!

@mgutz
Copy link

mgutz commented Jan 22, 2015

Unfortunately godo does not work in directories outside of GOPATH with this PR. I get import cycle not allowed errors. If I remember correctly that's why I settled on package main.

I created this file in my tmp/Gododir/main.go

package tasks

import (
    . "gopkg.in/godo.v1"
)

func Tasks(p *Project) {
    p.Task("whoami", func() {
        Run("whoami")
    })
}

It works well inside of GOPATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants