Skip to content

Instantly share code, notes, and snippets.

@bolilla
Created July 1, 2014 17:45
Show Gist options
  • Save bolilla/6184380fcd1806b6f263 to your computer and use it in GitHub Desktop.
Save bolilla/6184380fcd1806b6f263 to your computer and use it in GitHub Desktop.
GoPadawan PtrArrSlice Slice2
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