operator-sdk: Does not work with Modules

Feature Request

What did you do? I tried to run operator-sdk new foo --skip-git-init both in an empty directory as well as a directory containing both go.mod and go.sum.

What did you expect to see? I expected it to generate without any fuss.

What did you see instead? Under which circumstances? Output is:

INFO[0000] Creating new Go operator 'foo'.             
FATA[0000] Project not in $GOPATH

Environment

  • operator-sdk version:

    operator-sdk version v0.4.0

  • Are you writing your operator in ansible, helm, or go? go

Additional context printenv | grep GOPATH is empty

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 20 (8 by maintainers)

Most upvoted comments

This still doesn’t work for me, running MacOS 10.11.6 with Go 1.12.5 and GO111MODULE=on set.

operator-sdk version output:

operator-sdk version: v0.8.0, commit: 78c472461e75e6c64589cfadf577a2004b8a26b3

operator-sdk new some-operator --type=go --skip-git-init output (from outside $GOPATH):

INFO[0000] Creating new Go operator 'some-operator'.    
FATA[0000] Project not in $GOPATH

Sorry if I wasn’t clear enough, just wanted this to be turned into a feature request instead of a Bug Report

Ah sorry, didn’t see that. Changed now.

so this is not a bug for us but a new feature request.

Fair enough. You are aware that GOPATH will get deprecated, right?

Our aim is for Go 1.13, scheduled for August 2019, to enable module mode by default

See 1

Would it be possible @abergmeier to just adjust your text in the issue to reflect that

Sorry, I do not follow. What do you want to be adjusted? To me the issue is sufficient neutral.