Skip to content

Commit

Permalink
Merge pull request #40 from VinozzZ/main
Browse files Browse the repository at this point in the history
pkg/az: set unique user agent
  • Loading branch information
carolynvs authored Mar 8, 2022
2 parents 4d4d6da + 0e3074d commit 9dfeb77
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ replace (
)

require (
get.porter.sh/porter v1.0.0-alpha.10.0.20220224230106-49a42a969b67
get.porter.sh/porter v1.0.0-alpha.13
github.com/ghodss/yaml v1.0.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.1.3
Expand All @@ -35,10 +35,10 @@ require (
github.com/andybalholm/brotli v1.0.0 // indirect
github.com/andybalholm/cascadia v1.0.0 // indirect
github.com/carolynvs/aferox v0.3.0 // indirect
github.com/carolynvs/magex v0.6.0 // indirect
github.com/carolynvs/magex v0.6.1 // indirect
github.com/cbroglie/mustache v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/cnabio/cnab-go v0.22.1-0.20220219202519-002f3523865a // indirect
github.com/cnabio/cnab-go v0.23.0 // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20210303052042-6bc126869bf4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dsnet/compress v0.0.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0Wk
contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
get.porter.sh/porter v1.0.0-alpha.10.0.20220224230106-49a42a969b67 h1:efke/R3ICDPTwbvYlBRP5Bc7XEkYCnWDry0CW3CZqqg=
get.porter.sh/porter v1.0.0-alpha.10.0.20220224230106-49a42a969b67/go.mod h1:Ck2zoFZHEt8F0UJWxgDPrOW77jhPCGsYAz13mVGSWT0=
get.porter.sh/porter v1.0.0-alpha.13 h1:lrhHmO3aSxRZBDUSPunqF/YNyhHKvFhLxrQfhy3g59s=
get.porter.sh/porter v1.0.0-alpha.13/go.mod h1:aXV2AUvuc9/aExhaMN+nw2mVLesrEV4KCbWDwbKXC0c=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8=
Expand Down Expand Up @@ -251,8 +251,8 @@ github.com/carolynvs/aferox v0.3.0/go.mod h1:eb7CHGIO33CCZS//xtnblvPZbuuZMv0p1Vb
github.com/carolynvs/datetime-printer v0.2.0/go.mod h1:p9W8ZUhmQUOVD5kiDuGXwRG65/nTkZWlLylY7s+Qw2k=
github.com/carolynvs/liquid v1.2.5-0.20220131221838-2e107bef298f h1:VQBTZqr7lKJ7I5aibSzwlDd9QiPIJ2vZCYlHB4tUfuQ=
github.com/carolynvs/liquid v1.2.5-0.20220131221838-2e107bef298f/go.mod h1:w8U5mURyI2WkBkOqadQ8C2W+oK+8TDGwo8V612sRSAI=
github.com/carolynvs/magex v0.6.0 h1:rzz4RnBiR8hr2WYEsmq+mqkRLEstPnEK8ZP9MgxNY9Y=
github.com/carolynvs/magex v0.6.0/go.mod h1:hqaEkr9TAv+kFb/5wgDiTdszF13rpe0Q+bWHmTe6N74=
github.com/carolynvs/magex v0.6.1 h1:E/ezIActxIslFzwR/tD3j1CUPa64utMzN6aKQ2/xFG4=
github.com/carolynvs/magex v0.6.1/go.mod h1:hqaEkr9TAv+kFb/5wgDiTdszF13rpe0Q+bWHmTe6N74=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A=
Expand Down Expand Up @@ -284,8 +284,8 @@ github.com/cloudflare/cfssl v1.4.1/go.mod h1:KManx/OJPb5QY+y0+o/898AMcM128sF0bUR
github.com/cloudflare/go-metrics v0.0.0-20151117154305-6a9aea36fb41/go.mod h1:eaZPlJWD+G9wseg1BuRXlHnjntPMrywMsyxf+LTOdP4=
github.com/cloudflare/redoctober v0.0.0-20171127175943-746a508df14c/go.mod h1:6Se34jNoqrd8bTxrmJB2Bg2aoZ2CdSXonils9NsiNgo=
github.com/cnabio/cnab-go v0.10.0-beta1/go.mod h1:5c4uOP6ZppR4nUGtCMAElscRiYEUi44vNQwtSAvISXk=
github.com/cnabio/cnab-go v0.22.1-0.20220219202519-002f3523865a h1:i3IUtrvxZ7i7PEb2/C1InmJxUIOs59B/gPCw1CL+mRI=
github.com/cnabio/cnab-go v0.22.1-0.20220219202519-002f3523865a/go.mod h1:0DE0YB+qVoKLeg21cX30CIxBBhwEvs6v9b0prx9zoiA=
github.com/cnabio/cnab-go v0.23.0 h1:BBzSHCHWs4u0RT21VwGP9nAF+cq1pAkG5Qai4MQaOcs=
github.com/cnabio/cnab-go v0.23.0/go.mod h1:0DE0YB+qVoKLeg21cX30CIxBBhwEvs6v9b0prx9zoiA=
github.com/cnabio/cnab-to-oci v0.3.1-beta1.0.20210614060230-e4d2bd5441c8/go.mod h1:nl9mHZV0Tvj6ZirWkjpiWuVp71RenwUQ98KHA9ZY27g=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down
2 changes: 1 addition & 1 deletion pkg/az/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ func (m *Mixin) SetUserAgent() {

func (m *Mixin) UserAgent() string {
v := m.Version()
return v.Name + "/" + v.Version
return "getporter/" + v.Name + "/" + v.Version
}
2 changes: 1 addition & 1 deletion pkg/az/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ func TestSetUserAgent(t *testing.T) {
m := NewTestMixin(t)
m.SetUserAgent()

expected := "porter az/" + pkg.Version
expected := "getporter/porter getporter/az/" + pkg.Version
require.Contains(t, m.Getenv(AZURE_HTTP_USER_AGENT), expected)
}

0 comments on commit 9dfeb77

Please sign in to comment.