From 924fcadcc1f91b14e1e7627aa5891006fdf2598c Mon Sep 17 00:00:00 2001 From: Daniel Everts Date: Mon, 4 Dec 2023 09:24:16 +0100 Subject: [PATCH 1/2] patched xata agent to be sent with necessary metadata + in necessary format --- xata/internal/fern-core/generated/go/core/core.go | 5 +++-- xata/internal/fern-workspace/generated/go/core/core.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xata/internal/fern-core/generated/go/core/core.go b/xata/internal/fern-core/generated/go/core/core.go index d8a8273..235d931 100644 --- a/xata/internal/fern-core/generated/go/core/core.go +++ b/xata/internal/fern-core/generated/go/core/core.go @@ -20,14 +20,15 @@ const ( xataAgentHeader = "x-xata-agent" userAgentHeader = "user-agent" sdkVERSION = "0.0.1" + + xataAgentSDKName = "GO_SDK" ) // fernHeaders specifies all of the standard Fern headers in // a set so that they're easier to access and reference. var fernHeaders = []map[string]string{ {contentTypeHeader: contentType}, - {xataAgentHeader: "client=GO_SDK"}, - {xataAgentHeader: fmt.Sprintf("version=%v", sdkVERSION)}, + {xataAgentHeader: fmt.Sprintf("client=%s; version=%s", xataAgentSDKName, sdkVERSION)}, {userAgentHeader: fmt.Sprintf("xataio/xata-go:%v", sdkVERSION)}, } diff --git a/xata/internal/fern-workspace/generated/go/core/core.go b/xata/internal/fern-workspace/generated/go/core/core.go index d8a8273..235d931 100644 --- a/xata/internal/fern-workspace/generated/go/core/core.go +++ b/xata/internal/fern-workspace/generated/go/core/core.go @@ -20,14 +20,15 @@ const ( xataAgentHeader = "x-xata-agent" userAgentHeader = "user-agent" sdkVERSION = "0.0.1" + + xataAgentSDKName = "GO_SDK" ) // fernHeaders specifies all of the standard Fern headers in // a set so that they're easier to access and reference. var fernHeaders = []map[string]string{ {contentTypeHeader: contentType}, - {xataAgentHeader: "client=GO_SDK"}, - {xataAgentHeader: fmt.Sprintf("version=%v", sdkVERSION)}, + {xataAgentHeader: fmt.Sprintf("client=%s; version=%s", xataAgentSDKName, sdkVERSION)}, {userAgentHeader: fmt.Sprintf("xataio/xata-go:%v", sdkVERSION)}, } From 9213af638816fff52334a4ea719cf8b2fd72bcf9 Mon Sep 17 00:00:00 2001 From: Philip Krauss Date: Mon, 4 Dec 2023 10:31:00 +0100 Subject: [PATCH 2/2] add license header in example --- examples/list_workspaces.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/list_workspaces.go b/examples/list_workspaces.go index 008704f..37fdc92 100644 --- a/examples/list_workspaces.go +++ b/examples/list_workspaces.go @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 + package main import (