提交 4d188709 编写于 作者: G Gustav Simonsson

Use make instead of new for allocation

上级 9d2a1564
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册