Use make instead of new for allocation

This commit is contained in:
Gustav Simonsson 2015-04-24 17:41:38 +02:00
parent 9d2a156453
commit 4d1887093d

View File

@ -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 {