Skip to content

Commit 114e968

Browse files
go.mod: update segmentio/encoding to v0.3 (#55)
I recently updated segmentio/encoding from 0.2 to 0.3 and saw a 50% decrease in CPU usage, so figured I should submit the same change on some of Segment's more popular repos. Also update the Go version to Go 1.18, which has several optimizations compared with 1.16.
1 parent b3837c1 commit 114e968

File tree

5 files changed

+79
-18
lines changed

5 files changed

+79
-18
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
test:
44
working_directory: /go/src/github.com/segmentio/kubeapply
55
docker:
6-
- image: circleci/golang:1.16
6+
- image: circleci/golang:1.18
77
environment:
88
GO111MODULE: "on"
99

@@ -39,7 +39,7 @@ jobs:
3939
publish:
4040
working_directory: /go/src/github.com/segmentio/kubeapply
4141
docker:
42-
- image: circleci/golang:1.16
42+
- image: circleci/golang:1.18
4343

4444
steps:
4545
- checkout

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Fetch or build all required binaries
2-
FROM golang:1.16 as builder
2+
FROM golang:1.18 as builder
33

44
ARG VERSION_REF
55
RUN test -n "${VERSION_REF}"

Dockerfile.lambda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Fetch or build all required binaries
2-
FROM golang:1.16 as builder
2+
FROM golang:1.18 as builder
33

44
ARG VERSION_REF
55
RUN test -n "${VERSION_REF}"

go.mod

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/segmentio/kubeapply
22

3-
go 1.16
3+
go 1.18
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1
@@ -15,16 +15,11 @@ require (
1515
github.com/gogo/protobuf v1.3.1
1616
github.com/google/go-github/v30 v30.0.0
1717
github.com/gorilla/mux v1.7.4
18-
github.com/kr/text v0.2.0 // indirect
19-
github.com/mattn/go-colorable v0.1.4 // indirect
20-
github.com/mattn/go-isatty v0.0.11 // indirect
21-
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
22-
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
2318
github.com/olekukonko/tablewriter v0.0.4
2419
github.com/open-policy-agent/opa v0.27.1
2520
github.com/pmezard/go-difflib v1.0.0
2621
github.com/segmentio/conf v1.2.0
27-
github.com/segmentio/encoding v0.2.7
22+
github.com/segmentio/encoding v0.3.5
2823
github.com/segmentio/stats v3.0.0+incompatible
2924
github.com/segmentio/stats/v4 v4.5.3
3025
github.com/sirupsen/logrus v1.6.0
@@ -33,14 +28,10 @@ require (
3328
github.com/stripe/skycfg v0.0.0-20200303020846-4f599970a3e6
3429
github.com/x-cray/logrus-prefixed-formatter v0.5.2
3530
github.com/yannh/kubeconform v0.4.6
36-
github.com/zorkian/go-datadog-api v2.28.0+incompatible // indirect
3731
go.starlark.net v0.0.0-20201204201740-42d4f566359b
3832
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
39-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
40-
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
4133
gopkg.in/src-d/go-git.v4 v4.13.1
4234
gopkg.in/yaml.v2 v2.3.0
43-
gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 // indirect
4435
gopkg.in/zorkian/go-datadog-api.v2 v2.28.0
4536
k8s.io/api v0.20.2
4637
k8s.io/apimachinery v0.20.2
@@ -49,5 +40,72 @@ require (
4940
k8s.io/kubectl v0.20.2
5041
)
5142

43+
require (
44+
github.com/Masterminds/goutils v1.1.1 // indirect
45+
github.com/OneOfOne/xxhash v1.2.8 // indirect
46+
github.com/bytecodealliance/wasmtime-go v0.24.0 // indirect
47+
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
48+
github.com/davecgh/go-spew v1.1.1 // indirect
49+
github.com/emirpasic/gods v1.12.0 // indirect
50+
github.com/go-logr/logr v0.2.0 // indirect
51+
github.com/golang/protobuf v1.4.3 // indirect
52+
github.com/google/go-querystring v1.0.0 // indirect
53+
github.com/google/gofuzz v1.1.0 // indirect
54+
github.com/google/uuid v1.1.2 // indirect
55+
github.com/googleapis/gnostic v0.4.1 // indirect
56+
github.com/huandu/xstrings v1.3.1 // indirect
57+
github.com/imdario/mergo v0.3.11 // indirect
58+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
59+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
60+
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
61+
github.com/json-iterator/go v1.1.10 // indirect
62+
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
63+
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
64+
github.com/kr/text v0.2.0 // indirect
65+
github.com/mattn/go-colorable v0.1.4 // indirect
66+
github.com/mattn/go-isatty v0.0.11 // indirect
67+
github.com/mattn/go-runewidth v0.0.9 // indirect
68+
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
69+
github.com/mitchellh/copystructure v1.0.0 // indirect
70+
github.com/mitchellh/go-homedir v1.1.0 // indirect
71+
github.com/mitchellh/reflectwalk v1.0.0 // indirect
72+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
73+
github.com/modern-go/reflect2 v1.0.1 // indirect
74+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
75+
github.com/pkg/errors v0.9.1 // indirect
76+
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
77+
github.com/segmentio/asm v1.1.3 // indirect
78+
github.com/segmentio/go-snakecase v1.1.0 // indirect
79+
github.com/segmentio/objconv v1.0.1 // indirect
80+
github.com/sergi/go-diff v1.0.0 // indirect
81+
github.com/shopspring/decimal v1.2.0 // indirect
82+
github.com/spf13/cast v1.3.1 // indirect
83+
github.com/spf13/pflag v1.0.5 // indirect
84+
github.com/src-d/gcfg v1.4.0 // indirect
85+
github.com/xanzy/ssh-agent v0.2.1 // indirect
86+
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
87+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
88+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
89+
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
90+
github.com/zorkian/go-datadog-api v2.28.0+incompatible // indirect
91+
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
92+
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
93+
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 // indirect
94+
golang.org/x/text v0.3.4 // indirect
95+
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
96+
google.golang.org/appengine v1.6.5 // indirect
97+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
98+
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
99+
gopkg.in/go-playground/mold.v2 v2.2.0 // indirect
100+
gopkg.in/inf.v0 v0.9.1 // indirect
101+
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
102+
gopkg.in/validator.v2 v2.0.0-20180514200540-135c24b11c19 // indirect
103+
gopkg.in/warnings.v0 v0.1.2 // indirect
104+
gopkg.in/yaml.v3 v3.0.0-20200601152816-913338de1bd2 // indirect
105+
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
106+
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
107+
sigs.k8s.io/yaml v1.2.0 // indirect
108+
)
109+
52110
// Need to pin to older version to get around https://github.com/stripe/skycfg/issues/86.
53111
replace github.com/golang/protobuf v1.4.3 => github.com/golang/protobuf v1.3.2

go.sum

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,12 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
477477
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
478478
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
479479
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
480+
github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc=
481+
github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg=
480482
github.com/segmentio/conf v1.2.0 h1:5OT9+6OyVHLsFLsiJa/2KlqiA1m7mpdUBlkB/qYTMts=
481483
github.com/segmentio/conf v1.2.0/go.mod h1:Y3B9O/PqqWqjyxyWWseyj/quPEtMu1zDp/kVbSWWaB0=
482-
github.com/segmentio/encoding v0.2.7 h1:TKxEiKbernCFCTFW5wnSlE21kIQpqcY/ABXjhc9YeJU=
483-
github.com/segmentio/encoding v0.2.7/go.mod h1:MJjRE6bMDocliO2FyFC2Dusp+uYdBfHWh5Bw7QyExto=
484+
github.com/segmentio/encoding v0.3.5 h1:UZEiaZ55nlXGDL92scoVuw00RmiRCazIEmvPSbSvt8Y=
485+
github.com/segmentio/encoding v0.3.5/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM=
484486
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e h1:uO75wNGioszjmIzcY/tvdDYKRLVvzggtAmmJkn9j4GQ=
485487
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M=
486488
github.com/segmentio/go-snakecase v1.1.0 h1:ZJO4SNKKV0MjGOv0LHnixxN5FYv1JKBnVXEuBpwcbQI=
@@ -711,8 +713,9 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
711713
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
712714
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
713715
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
714-
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k=
715716
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
717+
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 h1:WecRHqgE09JBkh/584XIE6PMz5KKE/vER4izNUi30AQ=
718+
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
716719
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
717720
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
718721
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

0 commit comments

Comments
 (0)