GoTraining

command module
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 Imports: 8 Imported by: 0

README

Hardcore Go

Click Here To Review The Course Material

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Although it borrows ideas from existing languages, it has a unique and simple nature that make Go programs different in character from programs written in other languages. It balances the capabilities of a low-level systems language with some high-level features you see in modern languages today. This creates a programming environment that allows you to be incredibly productive, performant and fully in control; in Go, you can write less code and do so much more.

What You Will Learn

Hardcore Go is a 3 day class for any intermediate-level developer who has some experience with other programming languages and wants to learn Go. This class provides an intensive, comprehensive and idiomatic view of the language. We focus on both the specification and implementation of the language, including topics ranging from language syntax, Go’s type system, concurrency, channels, testing and more. We believe this class is perfect for anyone who wants a jump start in learning Go or who wants a more thorough understanding of the language and its internals.

Roadmap

  • Language Syntax
  • Arrays, Slices and Maps
  • Methods, Interfaces and Embedding
  • Packaging and Exporting
  • Using Pointers
  • Composition
  • Error Handling
  • Concurrency, Race Conditions and Channels
  • Concurrency Patterns
  • Testing and Debugging
  • Standard Library
  • Reflection
  • HTTP

Minimal Qualified Student

The material has been designed to be taught in a classroom environment. The code is well commented but missing some of the contextual concepts and ideas that will be covered in class. Students with the following minimal background will get the most out of the class.

  • Studied CS in school or has a minimum of two years of experience programming full time professionally.
  • Familiar with structural and object oriented programming styles.
  • Has worked with arrays, lists, queues and stacks.
  • Understands processes, threads and synchronization at a high level.
  • Operating Systems
    • Has worked with a command shell.
    • Knows how to maneuver around the file system.
    • Understands what environment variables are.

Other Languages

Korean

Before You Come To Class

Install Go On Mac OS X:
http://www.goinggo.net/2013/06/installing-go-gocode-gdb-and-liteide.html

Install Go On Windows:
http://www.wadewegner.com/2014/12/easy-go-programming-setup-for-windows/

Starter Material:
Quick Tour

Learn More:
http://golang.org/
https://tour.golang.org/welcome/1
http://www.goinggo.net/

Go Get The Material

go get github.com/ArdanStudios/gotraining

Feedback Form

https://ardanlabs.typeform.com/to/QzRgXk

Current Classes

If you are interested in holding an event in your area please let me know. I will work with you and your organization to help make it happen. I can talk in person or over Google Hangout.

Teachers

William Kennedy (@goinggodotnet)
Bill is a managing partner at Ardan Studios in Miami, FL, a mobile, web and systems development company. He is also the co-author of the book Go In Action, the author of the blog GoingGo.Net and the organizer for the Go and MongoDB meetups in Miami.

Kevin Gillette (@kevingillette)
Kevin is an experienced software engineer that has been enthusiastically using Go since 2012 to develop efficient, high-reliability backend systems. With a focus on breadth of knowledge, Kevin has expertise in a variety of languages and platforms, a firm grounding in theory, as well as a keen interest in computing history.

Cory LaNou (@corylanou)
Cory LaNou is a full stack web developer and entrepreneur with over 17 years of experience. After 11 years of being a successful serial entrepreneur, he has joined the InfluxDB team, working on building an open source time series database, written in Go. He is active in the Go community, leading the Denver Gophers meetup, as well as mentoring students in his free time.

Mark Bates (@markbates)
Mark Bates is the founder and chief architect of the Boston, MA based consulting company, Meta42 Labs. Mark spends his days focusing on new application development and consulting for his clients. At night he writes books, raises kids, and occasionally he forms a band and "tries to make it". Mark is the author of three books, "Distributed Programming with Ruby" (2009), "Programming in CoffeeScript" (2012), and "Conquering the Command Line" (2014). He also runs the weekly Golang screencast site, www.metacasts.tv.

Jeremy Saenz (@codegansta) Jeremy AKA @codegangsta is a fellow Gopher, author, speaker and screencaster. You have probably heard about one of his open source projects like Martini, Negroni, Gin, CLI and others. Jeremy is also the voice behind GopherCasts.io and loves teaching people about technology through his programming screencasts.

Testimonials

Geoff Clitheroe (@gclitheroe)
"Your training is awesome! Myself and three colleagues recently caught variations of the training at GopherCon and OSCON. We all thought the Bootcamp was the best thing at any of these conferences (and I went to both). Awesome work to Bill for presenting and anyone involved in developing the training. I really liked the structure, emphasis on deeper understanding, me doing a small number of examples to emphasize this, and general content. Night and day to other training which is to often just watching someone else live code. Great work."

ACL Services (@ACLServices)
"I'd just like to thank you again for just a phenomenal training session. The feedback from everyone was overwhelmingly positive. You probably could tell first hand that there were skeptics at first, but you’ve turned many into golang converts and we are really excited in growing golang adoption internally."

Joshua Shuster (@naysaier)
"I would consider Ardan Studio’s 3 day course to be invaluable. Bill and his staff, being some of the foremost authorities in the Go language, were able to make many of the complex go topics understandable. Covering everything from memory management, all the way up to building concurrency programs and web API's. It has given me the knowledge to write idiomatic Go, and make the best use of it’s features. I would highly their courses to anyone new to Go, or to anyone wanting to widen their existing knowledge."

Neeru Dwivedi
"I attended the one day workshop by Bill Kennedy from Ardan Labs. I was in for a surprise as before the workshop I was concerned whether I would understand concepts and whether I would be able to follow along. Bill has this wonderful way of explaining concepts and his knowledge on the concepts is so good that, I didn’t feel that I was learning something new & complicated. The Go Workshop got me started on the Go language. This workshop is perfect for beginners and anyone who wants to learn more about Go. I highly recommend this."

Todd Rafferty (@webrat)
"I highly recommend William Kennedy / Ardan Lab for Go Training. William is extremely passionate about the Go language and his energy feeds into his training. Very professional, very informative. My favorite section of his training, if I had to pick, was the segment on MultiWriters. I highly recommend a 3 day course, over a 2 day course. Even after the classes were over, William was always responsive with additional questions via various social media channels."

Georgi Knox (@GeorgiCodes)
"The Intro to Go Workshop enabled me to come into class with very little knowledge of Go and leave having a firm grasp of the key concepts of the language. Each topic was followed up with hands-on coding problems which helped to solidify what I was learning. My teacher Bill was not only approachable, but very excited about the language and his enthusiasm was contagious. I enjoyed that we talked about some of the lower level implementation details of Go which was something that I had found lacking from some books on the language. Overall I would highly recommend this workshop to anyone looking to learn Go quickly and effectively."

Jackie Heitzer (@JackieHeitzer)
"Great course and a perfect introduction to Go. Bill is very friendly and extremely knowledgeable about the Go language and I am excited to speak with him about Go in the future. The training had an excellent format with hands on coding examples. After the class I feel as though I have a better understanding of the key concepts, especially how pointers work. I highly recommend this course to anyone interested in learning more about Go."

Contact Information

William Kennedy
Ardan Studios
12973 SW 112 ST, Suite 153
Miami, FL 33186
bill@ardanstudios.com


Ardan Labs Ardan Studios GoingGo Blog


All material is licensed under the Apache License Version 2.0, January 2004.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
00-slides
day1/quick/hello
Sample program to show off Go and check programming environment.
Sample program to show off Go and check programming environment.
day1/quick/helloHTTP
Sample program to show off Go and check programming environment.
Sample program to show off Go and check programming environment.
quick_tour/code/cli
Sample program to show the basics of using flags.
Sample program to show the basics of using flags.
quick_tour/code/concurrency
Basic command line program that accepts arguments.
Basic command line program that accepts arguments.
quick_tour/code/http
Program to show how to run a basic web server.
Program to show how to run a basic web server.
01-language_syntax
01-variables/example1
Sample program to show how to declare variables.
Sample program to show how to declare variables.
01-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.
01-variables/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.
02-struct_types/example1
Sample program to show how to declare and initialize struct types.
Sample program to show how to declare and initialize struct types.
02-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.
02-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).
02-struct_types/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.
03-pointers/example1
Sample program to show the basic concept of pass by value.
Sample program to show the basic concept of pass by value.
03-pointers/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.
03-pointers/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.
03-pointers/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.
03-pointers/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.
03-pointers/exercises/exercise2
Declare a struct type and create a value of this type.
Declare a struct type and create a value of this type.
03-pointers/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.
03-pointers/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.
04-constants/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.
04-constants/exercises/exercise1
Declare an untyped and typed constant and display their values.
Declare an untyped and typed constant and display their values.
04-constants/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.
05-type_conversions/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.
05-type_conversions/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.
05-type_conversions/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.
05-type_conversions/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.
05-type_conversions/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.
06-functions/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.
06-functions/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.
06-functions/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.
06-functions/exercises/exercise1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.
06-functions/exercises/template1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.
02-array_slices_maps
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.
01-arrays/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.
01-arrays/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.
01-arrays/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.
01-arrays/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.
02-slices/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.
02-slices/example2
Sample program to show the components of a slice.
Sample program to show the components of a slice.
02-slices/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.
02-slices/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.
02-slices/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.
02-slices/example6
Sample program to show how to declare and use variadic functions.
Sample program to show how to declare and use variadic functions.
02-slices/exercises/exercise1
Declare a nil slice of integers.
Declare a nil slice of integers.
02-slices/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.
03-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.
03-maps/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.
03-maps/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.
03-maps/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.
03-maps/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.
03-methods_interfaces_embedding
01-methods/advanced/example1
Sample program to show how to declare function variables.
Sample program to show how to declare function variables.
01-methods/example1
Sample program to show how to declare methods and how the Go compiler supports them.
Sample program to show how to declare methods and how the Go compiler supports them.
01-methods/example2
Sample program to show how to declare methods against a named type.
Sample program to show how to declare methods against a named type.
01-methods/exercises/exercise1
Declare a struct that represents a baseball player.
Declare a struct that represents a baseball player.
01-methods/exercises/template1
Declare a struct that represents a baseball player.
Declare a struct that represents a baseball player.
02-interfaces/example1
Sample program to show how to use an interface in Go.
Sample program to show how to use an interface in Go.
02-interfaces/example2
Sample program to show how polymorphic behavior with interfaces.
Sample program to show how polymorphic behavior with interfaces.
02-interfaces/example3
Sample program to show how you can't always get the address of a value.
Sample program to show how you can't always get the address of a value.
02-interfaces/exercises/exercise1
Declare an interface named speaker with a method named sayHello.
Declare an interface named speaker with a method named sayHello.
02-interfaces/exercises/template1
Declare an interface named speaker with a method named sayHello.
Declare an interface named speaker with a method named sayHello.
03-embedding/example1
Sample program to show how what we are doing is NOT embedding a type but just using a type as a field.
Sample program to show how what we are doing is NOT embedding a type but just using a type as a field.
03-embedding/example2
Sample program to show how to embed a type into another type and the relationship between the inner and outer type.
Sample program to show how to embed a type into another type and the relationship between the inner and outer type.
03-embedding/example3
Sample program to show how embedded types work with interfaces.
Sample program to show how embedded types work with interfaces.
03-embedding/example4
Sample program to show what happens when the outer and inner type implement the same interface.
Sample program to show what happens when the outer and inner type implement the same interface.
03-embedding/exercises/exercise1
Copy the code from the template.
Copy the code from the template.
03-embedding/exercises/template1
Copy the code from the template.
Copy the code from the template.
04-packaging_exporting
example1
Sample program to show how to access an exported identifier.
Sample program to show how to access an exported identifier.
example1/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
example2
Sample program to show how the program can't access an unexported identifier from another package.
Sample program to show how the program can't access an unexported identifier from another package.
example2/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
example3
Sample program to show how the program can access a value of an unexported identifier from another package.
Sample program to show how the program can access a value of an unexported identifier from another package.
example3/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
example4
Sample program to show how unexported fields from an exported struct type can't be accessed directly.
Sample program to show how unexported fields from an exported struct type can't be accessed directly.
example4/animals
Package animals provides support.
Package animals provides support.
example5
Sample program to show how to create values from exported types with embedded unexported types.
Sample program to show how to create values from exported types with embedded unexported types.
example5/animals
Package animals provides support for animals.
Package animals provides support for animals.
exercises/exercise1
Create a package named toy with a single exported struct type named Toy.
Create a package named toy with a single exported struct type named Toy.
exercises/exercise1/toy
Package toy contains support for managing toy inventory.
Package toy contains support for managing toy inventory.
exercises/template1
Create a package named toy with a single exported struct type named Toy.
Create a package named toy with a single exported struct type named Toy.
exercises/template1/toy
Package toy contains support for managing toy inventory.
Package toy contains support for managing toy inventory.
05-using_pointers
exercises/exercise1
Declare a struct type named Point with two fields, X and Y of type int.
Declare a struct type named Point with two fields, X and Y of type int.
exercises/template1
Declare a struct type named Point with two fields, X and Y of type int.
Declare a struct type named Point with two fields, X and Y of type int.
06-composition
example1
Sample program demonstrating composition through embedding.
Sample program demonstrating composition through embedding.
example2
Sample program demonstrating composition through embedding.
Sample program demonstrating composition through embedding.
exercises/exercise1
Follow the guided comments to: Declare a sysadmin type that implements the administrator interface.
Follow the guided comments to: Declare a sysadmin type that implements the administrator interface.
exercises/template1
Follow the guided comments to: Declare a sysadmin type that implements the administrator interface.
Follow the guided comments to: Declare a sysadmin type that implements the administrator interface.
07-error_handling
example1
Sample program to show how the default error type is implemented.
Sample program to show how the default error type is implemented.
example2
Sample program to show how to use error variables to help the caller determine the exact error being returned.
Sample program to show how to use error variables to help the caller determine the exact error being returned.
example3
http://golang.org/src/pkg/encoding/json/decode.go Sample program to show how to implement a custom error type based on the json package in the standard library.
http://golang.org/src/pkg/encoding/json/decode.go Sample program to show how to implement a custom error type based on the json package in the standard library.
example4
Package example5 provides code to show how to implement behavior as context.
Package example5 provides code to show how to implement behavior as context.
example5
Sample program to show see if the class can find the bug.
Sample program to show see if the class can find the bug.
exercises/exercise1
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
exercises/exercise2
Create a custom error type called appError that contains three fields, Err error, Message string and Code int.
Create a custom error type called appError that contains three fields, Err error, Message string and Code int.
exercises/template1
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
exercises/template2
Create a custom error type called appError that contains three fields, Err error, Message string and Code int.
Create a custom error type called appError that contains three fields, Err error, Message string and Code int.
08-concurrency_channels
01-goroutines/example1
Sample program to show how to create goroutines and how the scheduler behaves.
Sample program to show how to create goroutines and how the scheduler behaves.
01-goroutines/example2
Sample program to show how the goroutine scheduler will time slice goroutines on a single thread.
Sample program to show how the goroutine scheduler will time slice goroutines on a single thread.
01-goroutines/example3
Sample program to show how to create goroutines and how the goroutine scheduler behaves with two contexts.
Sample program to show how to create goroutines and how the goroutine scheduler behaves with two contexts.
01-goroutines/exercises/exercise1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
01-goroutines/exercises/template1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
02-race_conditions/example1
Sample program to show how to create race conditions in our programs.
Sample program to show how to create race conditions in our programs.
02-race_conditions/example2
Sample program to show how to use the atomic package to provide safe access to numeric types.
Sample program to show how to use the atomic package to provide safe access to numeric types.
02-race_conditions/example3
Sample program to show how to use the atomic package functions Store and Load to provide safe access to numeric types.
Sample program to show how to use the atomic package functions Store and Load to provide safe access to numeric types.
02-race_conditions/example4
Sample program to show how to use a mutex to define critical sections of code that need synchronous access.
Sample program to show how to use a mutex to define critical sections of code that need synchronous access.
02-race_conditions/example5
Sample program to show how to use a read/write mutex to define critical sections of code that needs synchronous access.
Sample program to show how to use a read/write mutex to define critical sections of code that needs synchronous access.
02-race_conditions/exercises/exercise1
Answer for exercise 1 of Race Conditions.
Answer for exercise 1 of Race Conditions.
02-race_conditions/exercises/template1
Fix the race condition in this program.
Fix the race condition in this program.
03-channels/example1
Sample program to show how to use an unbuffered channel to simulate a game of tennis between two goroutines.
Sample program to show how to use an unbuffered channel to simulate a game of tennis between two goroutines.
03-channels/example2
Sample program to show how to use an unbuffered channel to simulate a relay race between four goroutines.
Sample program to show how to use an unbuffered channel to simulate a relay race between four goroutines.
03-channels/example3
This sample program demonstrates how to use a buffered channel to receive results from other goroutines in a guaranteed way.
This sample program demonstrates how to use a buffered channel to receive results from other goroutines in a guaranteed way.
03-channels/example4
This sample program demonstrates how to use a channel to monitor the amount of time the program is running and terminate the program if it runs too long.
This sample program demonstrates how to use a channel to monitor the amount of time the program is running and terminate the program if it runs too long.
03-channels/exercises/exercise1
Write a program where two goroutines pass an integer back and forth ten times.
Write a program where two goroutines pass an integer back and forth ten times.
03-channels/exercises/exercise2
Write a problem that uses a buffered channel to maintain a buffer of four strings.
Write a problem that uses a buffered channel to maintain a buffer of four strings.
03-channels/exercises/template1
Write a program where two goroutines pass an integer back and forth ten times.
Write a program where two goroutines pass an integer back and forth ten times.
03-channels/exercises/template2
Write a problem that uses a buffered channel to maintain a buffer of four strings.
Write a problem that uses a buffered channel to maintain a buffer of four strings.
09-concurrency_patterns
chat
Package chat implements a basic chat room.
Package chat implements a basic chat room.
chat/main
This sample program demonstrates how to create a simple chat system.
This sample program demonstrates how to create a simple chat system.
pool
Package pool manages a user defined set of resources.
Package pool manages a user defined set of resources.
pool/main
This sample program demonstrates how to use the pool package to share a simulated set of database connections.
This sample program demonstrates how to use the pool package to share a simulated set of database connections.
task
Package task provides a pool of goroutines to perform tasks.
Package task provides a pool of goroutines to perform tasks.
task/main
This sample program demonstrates how to use the work package to use a pool of goroutines to get work done.
This sample program demonstrates how to use the work package to use a pool of goroutines to get work done.
10-testing
01-testing/example4
Sample program that implements a simple web service.
Sample program that implements a simple web service.
01-testing/example4/handlers
Package handlers provides the endpoints for the web service.
Package handlers provides the endpoints for the web service.
03-caching
package caching provides code to show why CPU caches matter and the way the hardware caches memory affects performance.
package caching provides code to show why CPU caches matter and the way the hardware caches memory affects performance.
04-godebug
Sample program to review scheduler stats.
Sample program to review scheduler stats.
05-profiling
Sample program to show off Go and check programming environment.
Sample program to show off Go and check programming environment.
06-stack_trace/example1
Sample program to show how to read a stack trace.
Sample program to show how to read a stack trace.
06-stack_trace/example2
Sample program to show how to read a stack trace when it packs values.
Sample program to show how to read a stack trace when it packs values.
11-standard_library
01-logging/example1
Sample program to show how to use the log package from the standard library.
Sample program to show how to use the log package from the standard library.
01-logging/example2
Sample program to show how to extend the log package from the standard library.
Sample program to show how to extend the log package from the standard library.
01-logging/exercises/exercise1
Setup a new program to use the log package.
Setup a new program to use the log package.
01-logging/exercises/template1
Setup a new program to use the log package.
Setup a new program to use the log package.
02-encoding/example1
Sample program to show how to unmarshal a JSON document into a user defined struct type.
Sample program to show how to unmarshal a JSON document into a user defined struct type.
02-encoding/example2
Sample program to show how to unmarshal a JSON document into a user defined struct type from a file.
Sample program to show how to unmarshal a JSON document into a user defined struct type from a file.
02-encoding/example3
Sample program to show how to marshal a user defined struct type into a string.
Sample program to show how to marshal a user defined struct type into a string.
02-encoding/example4
Sample program to show how write a custom Unmarshal and Marshal functions.
Sample program to show how write a custom Unmarshal and Marshal functions.
02-encoding/exercises/exercise1
Create a file with an array of JSON documents that contain a user name and email address.
Create a file with an array of JSON documents that contain a user name and email address.
02-encoding/exercises/template1
Create a file with an array of JSON documents that contain a user name and email address.
Create a file with an array of JSON documents that contain a user name and email address.
03-writers_readers/advanced/example1
Sample program to show how io.Writes can be embedded within other Writer calls to perform complex writes.
Sample program to show how io.Writes can be embedded within other Writer calls to perform complex writes.
03-writers_readers/advanced/example2
Sample program that adds a few more features.
Sample program that adds a few more features.
03-writers_readers/example1
Sample program to show how different functions from the standard library use the io.Writer interface.
Sample program to show how different functions from the standard library use the io.Writer interface.
03-writers_readers/example2
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.
03-writers_readers/example3
Sample program to show how to use a MultiWriter to perform writes to multiple devices with one write call.
Sample program to show how to use a MultiWriter to perform writes to multiple devices with one write call.
03-writers_readers/exercises/exercise1
Download any document from the web and display the content in the terminal and write it to a file at the same time.
Download any document from the web and display the content in the terminal and write it to a file at the same time.
03-writers_readers/exercises/template1
Download any document from the web and display the content in the terminal and write it to a file at the same time.
Download any document from the web and display the content in the terminal and write it to a file at the same time.
12-reflection
example1
Sample program to show how the empty interface works.
Sample program to show how the empty interface works.
example2
Sample program to show how to reflect on a struct type with tags.
Sample program to show how to reflect on a struct type with tags.
example3
Sample program to show how to use reflection to decode an integer.
Sample program to show how to use reflection to decode an integer.
exercises/exercise1
Declare a struct type that represents a request for a customer invoice.
Declare a struct type that represents a request for a customer invoice.
exercises/template1
Declare a struct type that represents a request for a customer invoice.
Declare a struct type that represents a request for a customer invoice.
13-http
api
This program provides a sample web service that implements a RESTFul CRUD API against a MongoDB database.
This program provides a sample web service that implements a RESTFul CRUD API against a MongoDB database.
api/app
Package app provides application support for context and MongoDB access.
Package app provides application support for context and MongoDB access.
api/handlers
Package handlers contains the handler logic for processing requests.
Package handlers contains the handler logic for processing requests.
api/models
Package models contains data structures and associated behavior
Package models contains data structures and associated behavior
api/services
Package services provides business and data processing.
Package services provides business and data processing.
example1
Sample program to show how to implement a handler function with the http package.
Sample program to show how to implement a handler function with the http package.
example2
Sample program to show how you can use the FileServer handle with this service as a single call to ListenAndServe.
Sample program to show how you can use the FileServer handle with this service as a single call to ListenAndServe.
example3
Sample program to show how to use a ServeMux from the standard library.
Sample program to show how to use a ServeMux from the standard library.
14-cli

Jump to

Keyboard shortcuts

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