Skip to content

Commit 3524d1b

Browse files
authored
refactor: replace interface{} with any for clarity and modernization (#2288)
Signed-off-by: eroderust <eroderust@outlook.com>
1 parent 0d09188 commit 3524d1b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

internal/config/add-alias_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,20 @@ func Test_AddAlias(t *testing.T) {
178178
require.NoError(t, err)
179179

180180
// Unmarshal and verify the JSON structure
181-
var flowConfig map[string]interface{}
181+
var flowConfig map[string]any
182182
err = json.Unmarshal(flowJSON, &flowConfig)
183183
require.NoError(t, err)
184184

185185
// Verify contracts section exists
186-
contracts, ok := flowConfig["contracts"].(map[string]interface{})
186+
contracts, ok := flowConfig["contracts"].(map[string]any)
187187
require.True(t, ok, "contracts section should exist in flow.json")
188188

189189
// Verify TestContract exists
190-
testContract, ok := contracts["TestContract"].(map[string]interface{})
190+
testContract, ok := contracts["TestContract"].(map[string]any)
191191
require.True(t, ok, "TestContract should exist in flow.json")
192192

193193
// Verify aliases section exists in the contract
194-
aliases, ok := testContract["aliases"].(map[string]interface{})
194+
aliases, ok := testContract["aliases"].(map[string]any)
195195
require.True(t, ok, "aliases section should exist in TestContract")
196196

197197
// Verify mainnet alias exists with correct address (stored without 0x prefix)

0 commit comments

Comments
 (0)