Skip to content

Commit 9ebee65

Browse files
committed
fixup! chore(deps): Using a more recent go version for building
Signed-off-by: Vincent Boutour <[email protected]>
1 parent e7b3ee2 commit 9ebee65

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

aws/logs_monitoring/.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trim_trailing_whitespace = true
99
[*.yaml]
1010
indent_size = 2
1111

12-
[*.go]
12+
[{*.go,go.mod}]
1313
indent_style = tab
1414

1515
[Makefile]

aws/logs_monitoring/trace_forwarder/cmd/trace/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ type (
3737
func Configure(rootURL, apiKey string, InsecureSkipVerify bool) {
3838
// Need to make a copy of these values, otherwise the underlying memory
3939
// might be cleaned up by the runtime.
40-
localRootURL := fmt.Sprintf("%s", rootURL)
41-
localAPIKey := fmt.Sprintf("%s", apiKey)
40+
localRootURL := rootURL
41+
localAPIKey := apiKey
4242

4343
obfuscator = obfuscate.NewObfuscator(&obfuscate.Config{
4444
ES: obfuscate.JSONSettings{

aws/logs_monitoring/trace_forwarder/cmd/trace/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package main
99

1010
import (
11-
"io/ioutil"
11+
"io"
1212
"os"
1313
"testing"
1414

@@ -58,7 +58,7 @@ func TestForwardTracesWithXRayRoot(t *testing.T) {
5858
assert.NoError(t, err)
5959
defer file.Close()
6060

61-
contents, err := ioutil.ReadAll(file)
61+
contents, err := io.ReadAll(file)
6262
input := string(contents)
6363

6464
assert.NoError(t, err, "Couldn't read contents of test file")
@@ -71,7 +71,7 @@ func TestForwardTracesWithXRayRoot(t *testing.T) {
7171
result := ForwardTraces(input)
7272

7373
w.Close()
74-
out, _ := ioutil.ReadAll(r)
74+
out, _ := io.ReadAll(r)
7575
os.Stdout = originalStdout
7676

7777
outputLog := string(out)

aws/logs_monitoring/trace_forwarder/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/DataDog/datadog-serverless-functions/aws/logs_monitoring/trace
33
go 1.23.6
44

55
require (
6-
github.com/DataDog/datadog-agent v0.0.0-20200417180928-f454c60bc16f
6+
github.com/DataDog/datadog-agent v0.0.0-20200417180928-f454c60bc16f // This is kept as a commit ref for now
77
github.com/davecgh/go-spew v1.1.1
88
github.com/gogo/protobuf v1.3.2
99
github.com/stretchr/testify v1.10.0

aws/logs_monitoring/trace_forwarder/internal/apm/model_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package apm
1010
import (
1111
"encoding/json"
1212
"fmt"
13-
"io/ioutil"
13+
"io"
1414
"os"
1515
"strings"
1616
"testing"
@@ -40,7 +40,7 @@ func CompareSnapshot(t *testing.T, inputFile, snapshotFile string, updateSnapsho
4040
assert.NoError(t, err)
4141
defer file.Close()
4242

43-
contents, err := ioutil.ReadAll(file)
43+
contents, err := io.ReadAll(file)
4444

4545
assert.NoError(t, err, "Couldn't read contents of test file")
4646

@@ -72,19 +72,19 @@ func CompareSnapshot(t *testing.T, inputFile, snapshotFile string, updateSnapsho
7272
output := sc.Sdump(payload)
7373

7474
if updateSnapshots {
75-
err = ioutil.WriteFile(snapshotFile, []byte(output), 0o644)
75+
err = os.WriteFile(snapshotFile, []byte(output), 0o644)
7676
assert.NoError(t, err)
7777
fmt.Printf("Updated Snapshot %s\n", snapshotFile)
7878
} else {
79-
snapshot, err := ioutil.ReadFile(snapshotFile)
79+
snapshot, err := os.ReadFile(snapshotFile)
8080
assert.NoError(t, err, "Missing snapshot file for test")
8181
expected := string(snapshot)
8282
assert.Equal(t, expected, output, fmt.Sprintf("Snapshot's didn't match for %s. To update run `$UPDATE_SNAPSHOTS=true go test ./...`", inputFile))
8383
}
8484
}
8585

8686
func TestSnapshotsMatch(t *testing.T) {
87-
files, err := ioutil.ReadDir("testdata")
87+
files, err := os.ReadDir("testdata")
8888
assert.NoError(t, err)
8989
us := os.Getenv("UPDATE_SNAPSHOTS")
9090
updateSnapshots := strings.ToLower(us) == "true"

0 commit comments

Comments
 (0)