cleanup: replace TypeToPtr helper methods with pointer.Of (#14151)

Bumping compile time requirement to go 1.18 allows us to simplify our pointer helper methods.
This commit is contained in:
Piotr Kazmierczak
2022-08-17 18:26:34 +02:00
committed by GitHub
parent b9fec224ba
commit c4be2c6078
136 changed files with 2403 additions and 2521 deletions

View File

@@ -8,7 +8,7 @@ import (
"testing"
"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/helper"
"github.com/hashicorp/nomad/helper/pointer"
"github.com/mitchellh/cli"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -394,7 +394,7 @@ func TestIsValidConfig(t *testing.T) {
Client: &ClientConfig{
Enabled: true,
Artifact: &config.ArtifactConfig{
HTTPReadTimeout: helper.StringToPtr("-10m"),
HTTPReadTimeout: pointer.Of("-10m"),
},
},
},