Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the change
Follow up from this comment thread.
This change moves this repo to a single
go.mod
/go.sum
file (instead of one percmd
target). This means that when amain.go
file depends on something else in the repo, for example thestructs
package, it will depend on that package locally. Previously it depended on these resources as if they were an external library, which made updates awkward.I've included two commits here. The first shows what everything looks like if the
go.*
files are insrc/go
. Unfortunately that causes some slight inconveniences .go build
won't run asgo build github.com/target/strelka/src/go/cmd/strelka-oneshot
(error:go.mod file not found in current directory or any parent directory
). So that means you need tocd
intosrc/go
or use-C
to set the directory. Running the build insrc/go/cmd/strelka-oneshot
still works though. Anyways,go build
dumps the built binary in its working directory so that may just change some of the processes in docs.The second commit shows the most common pattern --
go.*
files in the root of the repo. This is the most convenient except for the slight modification to theDockerfile
s required to separately copy thego.*
files.I hope that all makes some sense!
Describe testing procedures
I can do some more thorough testing, but I believe just building validates everything that changed.
Sample output
N/A
Checklist