Skip to content

Commit

Permalink
Update Go version and migrate to Go modules (#287)
Browse files Browse the repository at this point in the history
* Adding go.mod and go.sum to migrate to Go modules from Glide

* Removed old Vendor folder after migrating to Go modules

* Adding new Vendor folder after migrating to Go mudules

* Removed Glide files, references in readme and updated CI/CD

* Migrated from bolt to bbolt for cache module to resolve race issue
  • Loading branch information
kashyap-splunk authored Sep 9, 2021
1 parent 6efac2f commit 09b634f
Show file tree
Hide file tree
Showing 2,643 changed files with 236,377 additions and 1,097,623 deletions.
17 changes: 7 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ version: 2 # use CircleCI 2.0
jobs:
build:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.17
working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run:
name: Install Dependencies
command: |
go get -u -v -t github.com/Masterminds/glide
glide install --strip-vendor
go mod vendor
- run:
name: Builder
command: make build
Expand All @@ -26,7 +25,7 @@ jobs:

deploy-nozzle:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.17
working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle
steps: # steps that comprise the `deploy` job
- attach_workspace:
Expand All @@ -35,8 +34,7 @@ jobs:
- run:
name: Install dependencies
command: |
go get -u -v -t github.com/Masterminds/glide
glide install --strip-vendor
go mod vendor
cp -R /tmp/splunk-firehose-nozzle .
- run:
name: Deploy nozzle
Expand All @@ -47,7 +45,7 @@ jobs:
tile-builder:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.17
working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle
steps:
- attach_workspace:
Expand All @@ -66,7 +64,7 @@ jobs:
execute_tests:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.17
working_directory: /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle
steps:
- attach_workspace:
Expand All @@ -75,8 +73,7 @@ jobs:
- run:
name: Install dependencies
command: |
go get -u -v -t github.com/Masterminds/glide
glide install --strip-vendor
go mod vendor
cp -R /tmp/splunk-firehose-nozzle .
- run:
name: Deploy data-gen
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ endif
default: installdeps build

installdeps:
glide install --strip-vendor
go mod vendor

updatedeps:
glide update
go get -u
go mod tidy
go mod vendor

initdeps:
glide create
go mod init
go mod tidy
go mod vendor

# -gcflags '-N -l' for debug
# -ldflags -w for prod
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,9 @@ Make sure you have the following installed on your workstation:
| Software | Version
| --- | --- |
| go | go1.12.x
| glide | 0.12.x
| go | go1.17.x
Then install all dependent packages via [Glide](https://glide.sh/):
Then make sure that all dependent packages are there:
```
$ cd <REPO_ROOT_DIRECTORY>
Expand Down
2 changes: 1 addition & 1 deletion cache/boltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"code.cloudfoundry.org/lager"

"github.com/boltdb/bolt"
cfclient "github.com/cloudfoundry-community/go-cfclient"
json "github.com/mailru/easyjson"
bolt "go.etcd.io/bbolt"
)

const (
Expand Down
123 changes: 0 additions & 123 deletions glide.lock

This file was deleted.

15 changes: 0 additions & 15 deletions glide.yaml

This file was deleted.

51 changes: 51 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module github.com/cloudfoundry-community/splunk-firehose-nozzle

go 1.17

require (
code.cloudfoundry.org/cfhttp v0.0.0-20160823172719-1d363866d79a
code.cloudfoundry.org/cflager v0.0.0-20160705185420-3b0406dd8038
code.cloudfoundry.org/lager v0.0.0-20161021174446-b273f19621a2
github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381
github.com/cloudfoundry/noaa v2.1.1-0.20190110210640-5ce49363dfa6+incompatible
github.com/cloudfoundry/sonde-go v0.0.0-20160804000546-81c3f6be579c
github.com/gogo/protobuf v0.0.0-20160804155430-a4cceea7a401
github.com/google/uuid v0.0.0-20170728174318-281f560d28af
github.com/gorilla/websocket v1.0.1-0.20160802133203-a69d25be2fe2
github.com/mailru/easyjson v0.0.0-20160816214844-3d7eb5818bd5
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.3
github.com/sirupsen/logrus v0.10.0
go.etcd.io/bbolt v1.3.6
gopkg.in/alecthomas/kingpin.v2 v2.2.3
)

require (
code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect
github.com/Masterminds/semver v1.4.3-0.20190429190951-059deebd1619 // indirect
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect
github.com/alecthomas/template v0.0.0-20150530000104-b867cc6ab45c // indirect
github.com/alecthomas/units v0.0.0-20150109002421-6b4e7dc5e314 // indirect
github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elazarl/goproxy v0.0.0-20210801061803-8e322dfb79c4 // indirect
github.com/elazarl/goproxy/ext v0.0.0-20210801061803-8e322dfb79c4 // indirect
github.com/golang/protobuf v1.2.0 // indirect
github.com/hpcloud/tail v1.0.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/appengine v1.4.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.2.4 // indirect
)
Loading

0 comments on commit 09b634f

Please sign in to comment.