02-array_slices_maps/

directory
v0.0.0-...-35bbffe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2015 License: Apache-2.0

Directories

Path Synopsis
01-arrays
example1
Sample program to show how to declare and iterate over arrays of different types.
Sample program to show how to declare and iterate over arrays of different types.
example2
Sample program to show how arrays of different sizes are not of the same type.
Sample program to show how arrays of different sizes are not of the same type.
example3
Sample program to show how the behavior of the for range and how memory for an array is contiguous.
Sample program to show how the behavior of the for range and how memory for an array is contiguous.
exercises/exercise1
Declare an array of 5 strings with each element initialized to its zero value.
Declare an array of 5 strings with each element initialized to its zero value.
exercises/template1
Declare an array of 5 strings with each element initialized to its zero value.
Declare an array of 5 strings with each element initialized to its zero value.
02-slices
advanced/example1
Sample program to show how to use a third index slice.
Sample program to show how to use a third index slice.
example1
Sample program to show how the capacity of the slice is not available for use.
Sample program to show how the capacity of the slice is not available for use.
example2
Sample program to show the components of a slice.
Sample program to show the components of a slice.
example3
Sample program to show how to takes slices of slices to create different views of and make changes to the underlying array.
Sample program to show how to takes slices of slices to create different views of and make changes to the underlying array.
example4
Sample program to show how to grow a slice using the built-in function append and how append grows the capacity of the underlying array.
Sample program to show how to grow a slice using the built-in function append and how append grows the capacity of the underlying array.
example5
Sample program to show how strings have a UTF-8 encoded byte array.
Sample program to show how strings have a UTF-8 encoded byte array.
example6
Sample program to show how to declare and use variadic functions.
Sample program to show how to declare and use variadic functions.
exercises/exercise1
Declare a nil slice of integers.
Declare a nil slice of integers.
exercises/template1
Declare a nil slice of integers.
Declare a nil slice of integers.
03-maps
advanced/example1
Sample program to show how to compose maps of maps.
Sample program to show how to compose maps of maps.
example1
Sample program to show how to declare, initialize and iterate over a map.
Sample program to show how to declare, initialize and iterate over a map.
example2
Sample program to show how to declare and initialize a map using a map literal.
Sample program to show how to declare and initialize a map using a map literal.
example3
Sample program to show how only types that can have equality defined on them can be a map key.
Sample program to show how only types that can have equality defined on them can be a map key.
exercises/exercise1
Declare and make a map of integer values with a string as the key.
Declare and make a map of integer values with a string as the key.
exercises/template1
Declare and make a map of integer values with a string as the key.
Declare and make a map of integer values with a string as the key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL