Created
March 13, 2020 14:10
-
-
Save hoelzro/813163d3ae4f08cc5915bb2c8aa385f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
sliceOne := make([]byte, 10) | |
sliceTwo := sliceOne[0:5] | |
fmt.Println(sliceOne) | |
fmt.Println(len(sliceOne)) | |
fmt.Println(cap(sliceOne)) | |
fmt.Println("-----") | |
fmt.Println(sliceTwo[0:6]) | |
fmt.Println(len(sliceTwo)) | |
fmt.Println(cap(sliceTwo)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment