upgrade to 1.9 and convert to dep

This commit is contained in:
Nate Brennand 2017-11-08 09:46:29 -08:00
parent ebf2e2dc98
commit 2a4e6fcc71
7 changed files with 151 additions and 104 deletions

80
Gopkg.lock generated Normal file
View file

@ -0,0 +1,80 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
name = "github.com/Clever/amazon-kinesis-client-go"
packages = ["batchconsumer","batchconsumer/stats","kcl","splitter"]
revision = "ebf2e2dc98e47f99f3804851df4d53785554fe99"
[[projects]]
branch = "master"
name = "github.com/Clever/syslogparser"
packages = [".","rfc3164"]
revision = "fb28ad3e4340c046323b7beba685a72fd12ecbe8"
[[projects]]
name = "github.com/davecgh/go-spew"
packages = ["spew"]
revision = "6d212800a42e8ab5c146b8ace3490ee17e5225f9"
[[projects]]
branch = "master"
name = "github.com/jeromer/syslogparser"
packages = ["."]
revision = "0e4ae46ea3f08de351074b643d649d5d00661a3c"
[[projects]]
name = "github.com/pmezard/go-difflib"
packages = ["difflib"]
revision = "d8ed2627bdf02c080bf22230dbb337003b7aba2d"
[[projects]]
name = "github.com/stretchr/testify"
packages = ["assert"]
revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0"
version = "v1.1.4"
[[projects]]
name = "github.com/xeipuuv/gojsonpointer"
packages = ["."]
revision = "e0fe6f68307607d540ed8eac07a342c33fa1b54a"
[[projects]]
branch = "master"
name = "github.com/xeipuuv/gojsonreference"
packages = ["."]
revision = "e02fc20de94c78484cd5ffb007f8af96be030a45"
[[projects]]
name = "github.com/xeipuuv/gojsonschema"
packages = ["."]
revision = "e18f0065e8c148fcf567ac43a3f8f5b66ac0720b"
[[projects]]
name = "golang.org/x/net"
packages = ["context"]
revision = "a6577fac2d73be281a500b310739095313165611"
[[projects]]
name = "golang.org/x/time"
packages = ["rate"]
revision = "f51c12702a4d776e4c1fa9b0fabab841babae631"
[[projects]]
name = "gopkg.in/Clever/kayvee-go.v6"
packages = [".","logger","router"]
revision = "096364e316a52652d3493be702d8105d8d01db84"
version = "v6.6.0"
[[projects]]
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "a5b47d31c556af34a302ce5d659e6fea44d90de0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "247dee07cda8454b26ac77236ab66b3a0d726aa8bd8d428a4123ada0c72e56d0"
solver-name = "gps-cdcl"
solver-version = 1

40
Gopkg.toml Normal file
View file

@ -0,0 +1,40 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]]
branch = "master"
name = "github.com/Clever/amazon-kinesis-client-go"
[[constraint]]
branch = "master"
name = "github.com/Clever/syslogparser"
[[constraint]]
name = "github.com/stretchr/testify"
[[constraint]]
name = "golang.org/x/time"
[[constraint]]
name = "gopkg.in/Clever/kayvee-go.v6"
version = "6.0.0"

View file

@ -5,7 +5,7 @@ SHELL := /bin/bash
PKG := github.com/Clever/amazon-kinesis-client-go
PKGS := $(shell go list ./... | grep -v /vendor )
.PHONY: download_jars run build
$(eval $(call golang-version-check,1.8))
$(eval $(call golang-version-check,1.9))
CONSUMER ?= consumer
TMP_DIR := ./tmp-jars
@ -58,8 +58,8 @@ test: $(PKGS)
$(PKGS): golang-test-all-deps
$(call golang-test-all,$@)
$(GOPATH)/bin/glide:
@go get github.com/Masterminds/glide
install_deps: $(GOPATH)/bin/glide
@$(GOPATH)/bin/glide install
install_deps: golang-dep-vendor-deps
$(call golang-dep-vendor)

View file

@ -1,7 +1,7 @@
machine:
post:
- cd $HOME && git clone --depth 1 -v git@github.com:clever/ci-scripts.git && cd ci-scripts && git show --oneline -s
- $HOME/ci-scripts/circleci/golang-install 1.8
- $HOME/ci-scripts/circleci/golang-install 1.9
services:
- docker
checkout:

53
glide.lock generated
View file

@ -1,53 +0,0 @@
hash: 6cc2c955c4d70fea747e0056aa63e8fe6a0f8d8c9baca20cf3a5a34d0c55b1fb
updated: 2017-08-16T20:57:02.3853046Z
imports:
- name: github.com/aws/aws-sdk-go
version: 819b71cf8430e434c1eee7e7e8b0f2b8870be899
subpackages:
- aws
- aws/session
- service/firehose
- name: github.com/Clever/kinesis-to-firehose
version: dca69c87e1662c7b1f55581399544d05fdcb09ab
subpackages:
- writer
- name: github.com/Clever/syslogparser
version: fb28ad3e4340c046323b7beba685a72fd12ecbe8
subpackages:
- rfc3164
- name: github.com/jeromer/syslogparser
version: 0e4ae46ea3f08de351074b643d649d5d00661a3c
- name: github.com/xeipuuv/gojsonpointer
version: e0fe6f68307607d540ed8eac07a342c33fa1b54a
- name: github.com/xeipuuv/gojsonreference
version: e02fc20de94c78484cd5ffb007f8af96be030a45
- name: github.com/xeipuuv/gojsonschema
version: e18f0065e8c148fcf567ac43a3f8f5b66ac0720b
- name: golang.org/x/net
version: a6577fac2d73be281a500b310739095313165611
subpackages:
- context
- name: golang.org/x/time
version: f51c12702a4d776e4c1fa9b0fabab841babae631
subpackages:
- rate
- name: gopkg.in/Clever/kayvee-go.v6
version: 096364e316a52652d3493be702d8105d8d01db84
subpackages:
- logger
- router
- name: gopkg.in/yaml.v2
version: a5b47d31c556af34a302ce5d659e6fea44d90de0
testImports:
- name: github.com/davecgh/go-spew
version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9
subpackages:
- spew
- name: github.com/pmezard/go-difflib
version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
subpackages:
- difflib
- name: github.com/stretchr/testify
version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0
subpackages:
- assert

View file

@ -1,23 +0,0 @@
package: github.com/Clever/amazon-kinesis-client-go
import:
- package: github.com/Clever/kinesis-to-firehose
subpackages:
- writer
- package: github.com/Clever/syslogparser
version: master
subpackages:
- rfc3164
- package: github.com/aws/aws-sdk-go
subpackages:
- aws
- aws/session
- service/firehose
- package: golang.org/x/time
subpackages:
- rate
- package: gopkg.in/Clever/kayvee-go.v6
version: ^6.0.0
testImport:
- package: github.com/stretchr/testify
subpackages:
- assert

View file

@ -1,10 +1,11 @@
# This is the default Clever Golang Makefile.
# It is stored in the dev-handbook repo, github.com/Clever/dev-handbook
# Please do not alter this file directly.
GOLANG_MK_VERSION := 0.1.5
GOLANG_MK_VERSION := 0.2.0
SHELL := /bin/bash
.PHONY: golang-godep-vendor golang-test-deps $(GODEP)
SYSTEM := $(shell uname -a | cut -d" " -f1 | tr '[:upper:]' '[:lower:]')
.PHONY: golang-test-deps bin/dep golang-ensure-curl-installed
# if the gopath includes several directories, use only the first
GOPATH=$(shell echo $$GOPATH | cut -d: -f1)
@ -27,37 +28,39 @@ _ := $(if \
$(error must be running Go version ^$(1) - you are running $(shell go version | cut -d" " -f3 | cut -c3-)))
endef
export GO15VENDOREXPERIMENT=1
# FGT is a utility that exits with 1 whenever any stderr/stdout output is recieved.
FGT := $(GOPATH)/bin/fgt
$(FGT):
go get github.com/GeertJohan/fgt
# Godep is a tool used to manage Golang dependencies in the style of the Go 1.5
# vendoring experiment.
GODEP := $(GOPATH)/bin/godep
$(GODEP):
go get -u github.com/tools/godep
golang-ensure-curl-installed:
@command -v curl >/dev/null 2>&1 || { echo >&2 "curl not installed. Please install curl."; exit 1; }
DEP_VERSION = v0.3.2
DEP_INSTALLED := $(shell [[ -e "bin/dep" ]] && bin/dep version | grep version | grep -v go | cut -d: -f2 | tr -d '[:space:]')
# Dep is a tool used to manage Golang dependencies. It is the offical vendoring experiment, but
# not yet the official tool for Golang.
bin/dep: golang-ensure-curl-installed
@mkdir -p bin
@[[ "$(DEP_VERSION)" != "$(DEP_INSTALLED)" ]] && \
echo "Updating dep..." && \
curl -o bin/dep -sL https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-$(SYSTEM)-amd64 && \
chmod +x bin/dep || true
golang-dep-vendor-deps: bin/dep
# golang-godep-vendor is a target for saving dependencies with the dep tool
# to the vendor/ directory. All nested vendor/ directories are deleted via
# the prune command.
define golang-dep-vendor
bin/dep ensure
endef
# Golint is a tool for linting Golang code for common errors.
GOLINT := $(GOPATH)/bin/golint
$(GOLINT):
go get github.com/golang/lint/golint
# golang-vendor-deps installs all dependencies needed for different test cases.
golang-godep-vendor-deps: $(GODEP)
# golang-godep-vendor is a target for saving dependencies with the godep tool
# to the vendor/ directory. All nested vendor/ directories are deleted as they
# are not handled well by the Go toolchain.
# arg1: pkg path
define golang-godep-vendor
$(GODEP) save $(1)
@# remove any nested vendor directories
find vendor/ -path '*/vendor' -type d | xargs -IX rm -r X
endef
# golang-fmt-deps requires the FGT tool for checking output
golang-fmt-deps: $(FGT)