Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename language fields in Stripe's user agent to start with lang #492

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ type Backends struct {
type stripeClientUserAgent struct {
Application *AppInfo `json:"application"`
BindingsVersion string `json:"bindings_version"`
Language string `json:"language"`
LanguageVersion string `json:"language_version"`
Language string `json:"lang"`
LanguageVersion string `json:"lang_version"`
Publisher string `json:"publisher"`
Uname string `json:"uname"`
}
Expand Down
6 changes: 3 additions & 3 deletions stripe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ func TestStripeClientUserAgent(t *testing.T) {
//

assert.Empty(t, userAgent["application"])
assert.Equal(t, "go", userAgent["language"])
assert.Equal(t, runtime.Version(), userAgent["language_version"])
assert.Equal(t, "go", userAgent["lang"])
assert.Equal(t, runtime.Version(), userAgent["lang_version"])

// Anywhere these tests are running can reasonable be expected to have a
// `uname` to run, so do this basic check.
assert.NotEqual(t, stripe.UnknownPlatform, userAgent["language_version"])
assert.NotEqual(t, stripe.UnknownPlatform, userAgent["lang_version"])
}

func TestStripeClientUserAgentWithAppInfo(t *testing.T) {
Expand Down