CONTENTS Preface
PART I-WHY LEARN GO-GETTING STARTED Chapter 1_Origins, Context and Popularity of Go
1.1 Origins and evolution..
1.2 Main characteristics, context and reasons for developing a new language.
1.2.1 Languages that influenced Go.
1.2.2 Why a new language?
1.2.3 Targets of the language
1.2.4 Guiding design principles
1.2.5 Characteristics of the language
1.2.6 Uses of the language....
1.2.7 Missing features?.
1.2.8 Programming in Go
1.2.9 Summary Chapter 2-Installation and Runtime Environment
2.1 Platforms and architectures
(1) The gc Go-compilers:
(2) The gccgo-compiler:....
(3) File extensions and packages:
2.2 Go Environment variables
2.3 Installing Go on a Linux system2.4 Installing Go on an OS X system
2.5 Installing Go on a Windows systen
2.6 What is installed on your machine?
2.7 The Go runtime.
2.8 A Go interpreter.
Chapter 3-Editors, IDE's and Other tools
3.1 Basic requirements for a decent Go development environment......
3.2 Editors and Integrated Development Environments.
3.2.1. Golang LitelDE
3.2.2. GoClipse.
3.3 Debuggers.....
3.4 Building and running go-programs with command-and Makefiles
3.5 Formatting code: go fmt or gofmt
3.6 Documenting code: go doc or godoc
3.7 Other tools
3.8 Go's performance.....
3.9 Interaction with other languages.
3.9.1. Interacting with C3.9.2. Interacting with C
....28
.28293233
..34353940
.41143431
PART 2-CORE CONSTRUCTS AND TECHNIOUES OF THE LANGUAGEChapter 4-Basic constructs and elementary data types.
4.1. Filenames-Keywords-Identifiers.
4.2. Basic structure and components of a Go-program
4.2.1 Packages, import and visibility....
4.2.3 Comments
4.2.4 Types.....
4.2.5 General structure of a Go-program.
4.2.6 Conversions
4.2.7 About naming things in Go
4.3. Constants.....4.4. Variables.....
4.4.1 Introduction ...
4.4.2 Value types and reference rypes
4 4 3 Print..........
4.4.4 Short form with the := assignment operator
4.4.5 Init-funcoio...
4.5. Elementary types and operators......
4.5.1.Boolean type bool
4.5.2.Numerical types
4.5.2.1 ints and floats.
45.2.2 Complex numbers
4.5.2.3 Bit operators
4.5.2.4 Logical operators.
4.5.2.5 Arithmetic operators
4.5.2.6 Random numbers...
4.5.3.Operators and precedence.
4.5.4.Aliasing types...
4.5.5.Character type
4.6.Strings.
4.7.The strings and strconv package
4.7.1_Prefixes and suffixes:
4.7.2-Testing whether a string contains a substring:
4.7.3-Indicating at which position(index)a substring or character occurs in a string:
4.7.4-Replacing a substring..
4.7.5_Counting occurrences of a substring:
4.7.6 Repeating a string...
4.7.7-Changing the case of a string...
4.7.8-Trimming a string:...
4.7.9_Splitting a string:.
4.7.10-Joining over a slice:
4.7.11Reading from a string.
4.8.Times and dates....
4.9. Pointers
Chapter 5_Control structures.
5.1-The if else construct
5.2-Testing for errors on functions with multiple return values.
5.3-The switch keyword
5.4-The for construct....
5.4.1 Counter-controlled iteration Character on position 2 is:.....
5.4.2 Condition-controlled iteration
5.4.3 Infinite o....
5.4.4 The for range construct
5.5-Break / continue....
5.6-Use of labels with break and continue-goto Chapter 6Functions..6.1 Introduction....
6.2 Parameters and return values
6.2.1 Call by value / Call by reference
6.2.2 Named return variables
6.2.3 Blank identifier
6.2.4 Changing an outside variable
6.3 Passing a variable number of parameters
6.4 Defer and tracing
6.5 Built-in functions
6.6 Recursive functions
6.8 Closures (function literals)....
6.9 Applying closures: a function returning another function
6.10 Debugging with closures.....
6.11 Timing a function.....
6.12 Using memoization for performance Chapter 7-Arrays and Slices
7.1 Declaration and initialization
7.1.1 Concept
7.1.2 Array literals.
7.1.3 Multidimensional arrays.....
7.1.4 Passing an array to a function
7.2 Sieces............
7.2.1 Concept
7.2.2 Passing a slice to a function
7.2.3 Creating a slice with make).
7.2.4 Difference between new() and make)
7.2.5 Multidimensional slices.
7.2.6 The bytes package7.3 For range construct
7.4 Reslicin..
7.5 Copying and appending slices
7.6 Applying strings, arrays and slices.
7.6.1 Making a slice of bytes from a string
7.6.2 Making a substring of a string..........
7.6.3 Memory representation of a string and a slice
7.6.4 Changing a character in a string....
7.6.5 Comparison function for byte arrays..