Closed
Description
See this discussion: http://groups.google.com/group/golang-dev/browse_thread/thread/db5a0502ed9e40d6 Sometimes when returning a slice it would be useful to be able to set its capacity. For instance, it would be easy to (wrongly) pass a slice returned from bufio.ReadSlice to bytes.NewBuffer and then write to that buffer, overwriting the next line. If ReadSlice could set the capacity of the returned slice, this would not be an issue. A possible syntax for this would be x[start : length : capacity]