#ok here s an easy question hopefully I m
1 messages · Page 1 of 1 (latest)
If you are doing this from the cloak repo it's a bit of a special case at the moment. The difference from making an out-of-tree extension is that the go.mod for the extension is in the root of the cloak repo, not the root of the extension.
So what you need to do is go to the root of the cloak repo and run cloak generate -p examples/foo/cloak.yaml.
Alternatively you could actually create a go.mod in the extension directory, but that will make it a bit annoying since it will be a go submodule with a dependency on its parent module.
However, the fact that the command didn't fail and instead just didn't create those files isn't right. You should get an error. Andrea ran into this yesterday too but I got distracted talking about other stuff after, I'll go make an issue for this
Should be able to take a look later today ideally
That makes sense. I was running cloak generate from the extension's directory, so it was picking up that project and workdir I believe, but I also had a go.mod which probably wasn't right. I removed the go.mod and ran generate from the cloak project with -p to my extension and we're all set now
Oh so when you were running cloak generate and getting no files created you actually did have a separate go.mod inside the extension's directory?
yeah exactly, I didn't consider that it's really a submodule of cloak's go.mod
Ah okay, that's good to know, it may be a slightly different problem than I thought then. I'll take a look later either way though