asecurityteam / rolling

Rolling window implementation in go.
Other
57 stars 20 forks source link

Migrating repo from dep to go modules #6

Closed aslape closed 5 years ago

aslape commented 5 years ago

This PR implements go modules as the dependency system for this repository. Functionally, these changes should be mostly invisible. We will still have vendor directories in the top level of our repositories, and we will still be able to install dependencies via “sdcli go dep”. Also, you won’t need to worry about your code being on the GOPATH anymore.

travis.yml - I’ve moved “make dep” into the script, as our old method would not fail a build if the dep step failed (since the install step doesn’t seem to care about exit codes). I’ve also added the “travis_retry” function to make dep, so in case we fail to pull in a dependency due to network issues, we will simply rerun make dep. This will retry 2 more times before failing the build.

Gopkg.lock, Gopkg.toml - Deleted these files since they are no longer necessary

Makefile - I’ve removed all use of the Go path (/go/src/) in our volume binding for our SDCLI docker containers, since we should no longer need to worry about that. This is an entirely cosmetic change, and if for any reason anyone would prefer to keep the old /go/src/ + pwd approach, I can revert this change.

go.mod - This is the go mod equivalent of Gopkg.toml. One cool thing about go.mod is that dependencies will be updated here automatically. For instance, if you add a new import to main_test.go, and then run your unit tests, Go will automatically add the new dependency to go.mod. This is a pretty good resource on the topic: https://blog.golang.org/using-go-modules

go.sum - This is the go mod equivalent of Gopkg.lock. This is created/updated when you run “go mod vendor” or “go mod download” with go.mod file present.

codecov[bot] commented 5 years ago

Codecov Report

Merging #6 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #6   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files           4        4           
  Lines         217      217           
=======================================
  Hits          203      203           
  Misses          9        9           
  Partials        5        5

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c63ea48...c483a1f. Read the comment docs.