appsrv: use copy() for copying slice

This commit is contained in:
Yousong Zhou
2018-12-19 13:12:44 +00:00
parent 27c9770017
commit a71d0518f4
+1 -3
View File
@@ -63,9 +63,7 @@ func (r *RadixNode) add(path []string, segments []string, data interface{}) erro
} else {
r.data = data
r.fullPath = make([]string, len(path))
for i := 0; i < len(path); i += 1 {
r.fullPath[i] = path[i]
}
copy(r.fullPath, path)
return nil
}
}