Commit 53e314e4 authored by Erin Swenson-Healey's avatar Erin Swenson-Healey

initialize to length and then index into pstrs

parent 3b148d2b
......@@ -392,8 +392,8 @@ func (dht *IpfsDHT) Close() error {
func (dht *IpfsDHT) protocolStrs() []string {
pstrs := make([]string, len(dht.protocols))
for _, proto := range dht.protocols {
pstrs = append(pstrs, string(proto))
for idx, proto := range dht.protocols {
pstrs[idx] = string(proto)
}
return pstrs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment