Created
July 1, 2014 17:45
-
-
Save bolilla/6184380fcd1806b6f263 to your computer and use it in GitHub Desktop.
GoPadawan PtrArrSlice Slice2
This file contains 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() { | |
var sliceDeDosHastaCuatro = make([]int, 2, 4) | |
fmt.Println("Este es tu slice, pequeño padawan:", sliceDeDosHastaCuatro) | |
fmt.Println("Este array tiene una capacidad de", cap(sliceDeDosHastaCuatro)) | |
fmt.Println("De momento estamos utilizando", len(sliceDeDosHastaCuatro)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment