Skip to content

HAL-08 use of deprecated functions #3242

@juniuszhou

Description

@juniuszhou

Description

Deprecated Go functions were identified in the codebase. The function(s)
are:
• grpc.WithInsecure
• package ioutil

Code Location:

Listing 14: Uses of deprecated function grpc.WithInsecure
1 355: gRpcClientConn , err := grpc . Dial (sub . SifnodeGrpc , grpc . ë WithInsecure () )
23 cmd / ebrelayer / relayer / ethereum .go
4 477: conn , err := grpc . Dial ( sub . SifnodeGrpc , grpc . WithInsecure
ë () )
56 cmd / ebrelayer / relayer / prophecyHandler .go
7 160: conn , err := grpc . Dial ( sifnodeGrpc , grpc . WithInsecure () )
Listing 15: Uses of deprecated package ioutil
1 x/ dispensation / utils / parser .go
2 26: input , err := ioutil . ReadFile ( file ) 3 44: o, err := ioutil . ReadFile ( file ) 45 x/clp / client /cli /tx.go
6 70: input , err := ioutil . ReadFile ( file ) 7 421: input , err := ioutil . ReadFile ( file ) 8 436: input , err = ioutil . ReadFile ( file ) 9 725: input , err := ioutil . ReadFile ( file )
10
11 x/clp / test / test_common .go
12 306: input , err := ioutil . ReadFile ( file )
14 x/ tokenregistry / utils / parse_denom_list .go
15 18: o, err := ioutil . ReadFile ( file )
16
17 scripts / ibc / tokenregistration / main .go
18 65: input , err := ioutil . ReadFile ( file )
19
20 x/ ethbridge / client /cli /tx.go
21 422: contents , err := ioutil . ReadFile ( file )
22
23 tools / sifgen / genesis / genesis .go
24 134: body , err := ioutil . ReadFile ( genesisPath )
25
26 cmd / ebrelayer / internal / symbol_translator / symbol_translator .go
27 28: contents , err := ioutil . ReadFile ( filename )
28
29 tools / sifgen / node / node .go
30 373: content , err := ioutil . ReadFile (n. CLI . ConfigFilePath () )
31 388: content , err := ioutil . ReadFile (n. CLI . AppFilePath () )
32
33 tools / sifgen / network / network .go
34 36: data , err := ioutil . ReadFile (fmt . Sprintf ("%s/%s. yml ", ë networkDir , file ) )
35 355: content , err := ioutil . ReadFile ( configFile )
36 388: input , err := ioutil . ReadFile ( srcFile )

Recommendation

Replace deprecated functions with up-to-date functions.
The packages io or os can be used in place of ioutil.
Consider using the following implementation instead of grpc.WithInsecure():

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions