mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
Use make instead of new for allocation
This commit is contained in:
@@ -117,7 +117,7 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
addresses = *new([][]byte)
|
||||
addresses = make([][]byte, 0)
|
||||
for _, fileInfo := range fileInfos {
|
||||
address, err := hex.DecodeString(fileInfo.Name())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user