Update index.md (#22323)
* Update index.md Add a short description for slices * Removed stub
This commit is contained in:
committed by
Manish Giri
parent
6d2db1993a
commit
13d423e94e
@ -3,11 +3,11 @@ title: Go Slices
|
|||||||
---
|
---
|
||||||
## Go Slices
|
## Go Slices
|
||||||
|
|
||||||
This is a stub. [Help our community expand it](https://github.com/freecodecamp/guides/tree/master/src/pages/go/go-slices/index.md).
|
Slices are a key data type in Go, giving a more powerful interface to sequences than arrays.
|
||||||
|
|
||||||
[This quick style guide will help ensure your pull request gets accepted](https://github.com/freecodecamp/guides/blob/master/README.md).
|
Unlike arrays, slices are typed only by the elements they contain (not the number of elements). To create an empty slice with non-zero length, use the builtin make. Here we make a slice of strings of length 3 (initially zero-valued).
|
||||||
|
|
||||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
```s := make([]string, 3)```
|
||||||
|
|
||||||
#### More Information:
|
#### More Information:
|
||||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
||||||
|
Reference in New Issue
Block a user