Skip to content

Commit

Permalink
feat: change pointer util
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisAmora committed Feb 21, 2025
1 parent b33d188 commit fae41c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions deployment/data-streams/jobs/don_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

"github.com/AlekSi/pointer"
"github.com/google/uuid"
"github.com/smartcontractkit/chainlink/deployment/data-streams/utils/pointer"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -69,9 +69,9 @@ func TestDonJobSpec_MarshalTOML(t *testing.T) {
},
ContractID: "contract-123",
TransmitterID: "tx-123",
ForwardingAllowed: pointer.ToBoolOrNil(true),
ForwardingAllowed: pointer.To(true),
P2PV2Bootstrappers: []string{"bootstrap1", "bootstrap2"},
OCRKeyBundleID: pointer.ToStringOrNil("ocr-bundle-123"),
OCRKeyBundleID: pointer.To("ocr-bundle-123"),
MaxTaskDuration: 10 * time.Second,
ContractConfigTrackerPollInterval: 1 * time.Minute,
Relay: "testrelay",
Expand Down
5 changes: 5 additions & 0 deletions deployment/data-streams/utils/pointer/pointer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package pointer

func To[T any](v T) *T {
return &v
}
1 change: 0 additions & 1 deletion deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ replace github.com/smartcontractkit/chainlink/v2 => ../
require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0

require (
github.com/AlekSi/pointer v1.1.0
github.com/Khan/genqlient v0.7.0
github.com/Masterminds/semver/v3 v3.3.0
github.com/aptos-labs/aptos-go-sdk v1.5.0
Expand Down

0 comments on commit fae41c5

Please sign in to comment.