01-language_syntax/

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-variables
example1
Sample program to show how to declare variables.
Sample program to show how to declare variables.
exercises/exercise1
Declare three variables that are initialized to their zero value and three declared with a literal value.
Declare three variables that are initialized to their zero value and three declared with a literal value.
exercises/template1
Declare three variables that are initialized to their zero value and three declared with a literal value.
Declare three variables that are initialized to their zero value and three declared with a literal value.
02-struct_types
advanced/example1
Sample program to show how struct types align on boundaries.
Sample program to show how struct types align on boundaries.
example1
Sample program to show how to declare and initialize struct types.
Sample program to show how to declare and initialize struct types.
example2
Sample program to show how to declare and initialize anonymous struct types.
Sample program to show how to declare and initialize anonymous struct types.
exercises/exercise1
Declare a struct type to maintain information about a user (name, email and age).
Declare a struct type to maintain information about a user (name, email and age).
exercises/template1
Declare a struct type to maintain information about a user (name, email and age).
Declare a struct type to maintain information about a user (name, email and age).
03-pointers
advanced/example1
Sample program to show how the backing array for a referene type can be placed contiguous in memory with the header value.
Sample program to show how the backing array for a referene type can be placed contiguous in memory with the header value.
example1
Sample program to show the basic concept of pass by value.
Sample program to show the basic concept of pass by value.
example2
Sample program to show the basic concept of using a pointer to share data.
Sample program to show the basic concept of using a pointer to share data.
example3
Sample program to show the basic concept of using a pointer to share data.
Sample program to show the basic concept of using a pointer to share data.
example4
Sample program to show varaibles stay on or escape from the stack.
Sample program to show varaibles stay on or escape from the stack.
exercises/exercise1
Declare and initialize a variable of type int with the value of 20.
Declare and initialize a variable of type int with the value of 20.
exercises/exercise2
Declare a struct type and create a value of this type.
Declare a struct type and create a value of this type.
exercises/template1
Declare and initialize a variable of type int with the value of 20.
Declare and initialize a variable of type int with the value of 20.
exercises/template2
Declare a struct type and create a value of this type.
Declare a struct type and create a value of this type.
04-constants
example1
Sample program to show how to declare constants and their implementation in Go.
Sample program to show how to declare constants and their implementation in Go.
example2
Sample program to show how constants do have a parallel type system.
Sample program to show how constants do have a parallel type system.
exercises/exercise1
Declare an untyped and typed constant and display their values.
Declare an untyped and typed constant and display their values.
exercises/template1
Declare an untyped and typed constant and display their values.
Declare an untyped and typed constant and display their values.
05-type_conversions
example1
Sample program to show how to declare and use a named type.
Sample program to show how to declare and use a named type.
example2
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
example3
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
example4
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
Sample program to show a idiomatic use of named types from the standard library and how they work in concert with other Go concepts.
exercises/exercise1
Declare a named type called counter with a base type of int.
Declare a named type called counter with a base type of int.
exercises/template1
Declare a named type called counter with a base type of int.
Declare a named type called counter with a base type of int.
06-functions
advanced/example1
Sample program to show how to trap panics that can occur from the Go runtime.
Sample program to show how to trap panics that can occur from the Go runtime.
example1
Sample program to show how functions can return multiple values while using named and struct types.
Sample program to show how functions can return multiple values while using named and struct types.
example2
Sample program to show how we can use the blank IDentifier to ignore return values.
Sample program to show how we can use the blank IDentifier to ignore return values.
example3
Sample program to show some of the mechanics behind the short variable declaration operator redeclares.
Sample program to show some of the mechanics behind the short variable declaration operator redeclares.
exercises/exercise1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.
exercises/template1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.

Jump to

Keyboard shortcuts

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