gotraining

command module
Version: v0.0.0-...-ae246d5 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

README

Go Training

Click Here To See The Different Courses And 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.

Learn More

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.

Important Reading

Please check out this page of important reading. You will find articles and videos around mechanical sympathy, data-oriented design, Go runtime and optimizations and articles about the history of computing.

Our Experience

We have taught classes to thousands of students for over the past two years and all around the world.

Look at our schedule: https://github.com/ardanlabs/gotraining#schedule

Before You Come To Class

The following is a set of tasks that can be done prior to showing up for class. We will also do this in class if anyone has not completed it. However, the more attendees that complete this ahead of time the more time we have to cover additional training material.

Joining the Go Slack Community

We use a slack channel to share links, code, and examples during the training. This is free. This is also the same slack community you will use after training to ask for help and interact with may Go experts around the world in the community.

  1. Using the following link, fill out your name and email address: https://gophersinvite.herokuapp.com/
  2. Check your email, and follow the link to the slack application.
  3. Join the training channel by clicking on this link: https://gophers.slack.com/messages/training/
  4. Click the “Join Channel” button at the bottom of the screen.

Installing Go

Local Installation

I do not recommend using homebrew or apt-get.

https://www.goinggo.net/2016/05/installing-go-and-your-workspace.html

Using Docker

Installing Go may not be needed if you choose to use Docker. With running a gotraining container, you can download the training material at any location on your disk without having to set $GOPATH. And you can still access (e.g. for editing) the training materials locally.

git clone https://github.com/ardanlabs/gotraining.git
cd gotraining

NOTE: This assumes you have Git installed. If you don’t, you can find the installation instructions here: https://git-scm.com/

To build and run docker container to start your training right away, see here.

Editors

Visual Studio Code
https://code.visualstudio.com/Updates
https://github.com/microsoft/vscode-go

Sublime
http://www.sublimetext.com/
https://github.com/DisposaBoy/GoSublime
http://www.wolfe.id.au/2015/03/05/using-sublime-text-for-go-development/

VIM
http://www.vim.org/download.php
http://farazdagi.com/blog/2015/vim-as-golang-ide/

Atom
https://atom.io/
https://github.com/joefitzgerald/go-plus

LiteIDE
http://sourceforge.net/projects/liteide/files/

Emacs
https://github.com/creack/dotfiles

For a full list of editors, see the wiki: https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins

Installing the Training Material

While many of the examples can be done using the online playground (http://play.golang.org), some may find it easier to complete them with their local editor. To do so, you will want to load the training material locally to your machine. From a command prompt, issue the following commands:

mkdir -p $GOPATH/src/github.com/ardanlabs
cd $GOPATH/src/github.com/ardanlabs
git clone https://github.com/ardanlabs/gotraining.git

NOTE: This assumes you have Git installed. If you don’t, you can find the installation instructions here: https://git-scm.com/

Starter Material

Quick Tour

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

Go Get The Training Material

go get github.com/ardanlabs/gotraining

Teachers

William Kennedy (@goinggodotnet)
William Kennedy is a managing partner at Ardan Studio in Miami, Florida, a mobile, web, and systems development company. He is also a co-author of the book Go in Action, the author of the blog GoingGo.Net, and a founding member of GoBridge which is working to increase Go adoption through diversity.

Going Go - Blog
Running MongoDB Queries Concurrently With Go - Blog
Go In Action - Book
GopherCon 2014 - Building an analytics engine - Video
GoSF - The Nature of Constants in Go - Video
GothamGo - Error Handling in Go - Video
GopherCon India - Go In Action - Video
Bangalore Meetup - OOP in Go - Video
Vancouver Meetup - Compiler Optimizations in Go - Video
GolangUK - Dependency Management - Video

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.

Twitter

Ian Molee (@ianfoo)
"If you're at @GopherCon, get yourself to a session with @goinggodotnet. Superb! Pretty sure his pic appears with the definition of "dynamo.""

Camilo Aguilar (@c4milo)
"Holy cow, the best lighting talk I have ever seen about mechanical sympathy by @goinggodotnet. Here at #gophercon"

Jessie Frazelle (@frazelledazzell)
"@goinggodotnet you were amazing!!! So enthusiastic!!! Thanks for doing this for everyone!"

Kelsey Hightower (‏@kelseyhightower)
"Day 1 of the [Ultimate] Go workshop was outstanding! Big shoutout to @intel, @golangbridge, and @goinggodotnet for bringing this to Portland."

Katrina Owen (@kytrinyx)
"OH: "You thought you knew Go..." (You do Go? You want to do Go?) You should take this workshop. Seriously.) "

Matt Oswalt (@Mierdin)
"Should be mentioned that though I am no expert, I have been using Go for about a year - and this meetup is kicking my ass."

Testimonials

Greg Hammond, Founder & CEO at Best Option Trading
"Bill helped me learn enough Go to work with him and his team to take a program with a lot of complexity, accumulated over years, and make it into an enterprise product. As architect, he made it more extensible, tested, and created an external API. Bill has a gift for writing readable code that is easy to reason about. He demonstrates coding restraint by favoring code that is maintainable, rather than relying upon overly clever solutions. At the same time, he is a performance hawk, always thinking about how to cut milliseconds from runtime. When I began the project with Bill, I was under pressure from both schedule and cost perspectives. He put in extra effort at the end of the project to deliver what I needed. I highly recommend Bill for his well-written book, his 'Ultimate Go' course, and development work through Ardan Labs."

Susan Dady, Software Engineer - GE Digital
"Rarely will you come across a course as worthwhile as this one. I learned many things relevant and useful in my daily work and William's energy kept me engaged. I came back to work excited to get coding in Go."

Paul Garvey, Software Engineer - GE Digital
"Looking back I am grateful I took the GoLang training course. I had planned to just buy a few books and learned it on my own. In retrospect that would have been a bad decision as I would missed out on all the pitfalls, best practices, practical exercises and discussions the instructor imparted from his years of experience in the field, writing a book and blogging with other gophers. In the end I felt I learn more in 3 days then I could reading books and learning GoLang on my own and all my colleagues who took the course all share this view. We also share the view that Bill the instructor brought an enthusiasm and energy to the course that made a really technical course easy to learn. I would recommend anyone who want to learn Go to sign up with Mr Kennedy. At the end of the course you will feel like you are ready to rewrite all your old apps in Go :-)"

Richard Stanley, Software Engineer - GE Digital
"Not only does Bill deeply understands the technical details of Go, he also can explain them in an effective, enthusiastic manner that helped me retain somewhat dry material. His passion for the language and its capabilities are obvious through out his training."

Shalab Goel, Ph.D.
"It was a pleasure taking this course — learning lot of "dry" stuff in such animated and enthusiastic environment. The exercises were spot on for building what you called as "memory muscle. I have good amount of background in conventional multithreaded and distributed environments, but I have not put that knowledge to use more recently; so it was good refresher from that point of view as well. From Yuck to completely Wow-ed is how I will like to describe my respect for Go within three days. I knew nothing about GO before the course."

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 its 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."

Schedule

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.

2016
    Capital One 	Richmond, VA 		- January  
	BOT 			Miami, FL 			- January  
	CISCO 			Lawrenceville, GA 	- February  
	Ultimate Go 	Utrecht, Amsterdam	- March  
	GE 				San Ramon, CA 		- March  
	WWG 			SF, CA 				- March  
	Ultimate Go 	SLC, UT 			- March  
	SAS 			Cary, NC 			- March  
	Ultimate Go 	SF, CA 				- April  
	Salesforce 		Dublin, Ireland 	- April  
	CapitalOne 		Richmond, VA 		- April  
	HP Enterprise 	Seattle, WA 		- May  
	CISCO 			Lawrenceville, GA 	- May  
	Rackspace 		San Antonio, TX 	- May  
	OSCON 			Portland, OR  		- May  
	Intel 			Hillsboro, OR 		- May  
	Staples 		Framingham, MA  	- May  
	Ultimate Go 	London, England 	- June  
	Ultimate Go 	Phoenix, AZ  		- June
	GopherCon		Denver, CO  		- July  

                --- Pending ---

	Red Ventures 	South Carolina	 	- August  
	GolangUK 		London, England 	- August  
	Tune 			Seattle, WA	 		- August  
	Traderev		Toronto, Canada 	- September  
	Ultimate Go 	Toronto, Canada 	- September  
	dotGo			Paris, France		- October  
	Centralway		Zürich, Switzerland	- October  
	DevconTLV		Tel Aviv, Israel	- November    
2015
    Edmonton Go 	Edmonton, Canada 	- January  
	GopherCon 		Bangalore, India 	- February  
	Ultimate Go 	Denver, CO 			- March  
	Ultimate Go 	SF, CA 				- March  
	Ultimate Go 	Denver, CO 			- April  
	FluentConf 		SF, CA 				- April  
	ACL 			Vancouver, Canada 	- May  
	PowerChord 		Tampa, FL 			- May  
	Rackspace 		San Antonio, TX 	- May  
	Ultimate Go 	NYC, NY 			- June  
	MagmaConf  		Manzanillo, Mexico 	- June  
	Ultimate Go		Denver, CO 			- July  
	NY Times   		NYC, NY 			- July  
	OSCON      		Portland, OR 		- July  
	WWG 			SF, CA 				- August  
	GolangUK 		London, England 	- August  
	YikYak 			Atlanta, GA 		- August  
	Bridgevine 		Miami, FL 			- September  
	Ultimate Go 	Seattle, WA 		- September  
	Fidelity 		Dublin, Ireland 	- September  
	Ultimate Go 	SF, CA 				- September  
	GothamGo 		NYC, NY 			- October  
	Economist 		NYC, NY 			- October  
	GE 				San Ramon, CA 		- October  
	Teradata 		San Diego, CA 		- October  
	SAS 			Cary, NC 			- October  
	NY Times 		NYC, NY 			- November  
	Meetme 			New Paltz, NY 		- November  
	NY Times 		NYC, NY 			- November 
	Ultimate Go 	Portland, OR 		- November  
	Nordstrom 		Seattle, WA 		- December  
2014
    Comcast 		SF, CA 				- August  
	GothamGo 		NYC, NY 			- October  
	Comcast 		Reston, VA 			- December

Contact Information

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


Running Docker

Install Docker Toolbox
https://www.docker.com/products/docker-toolbox

Build Docker container

# current path is the source root where Dockerfile exists
docker build -t ardanlabs-gotraining .

Start Docker container

docker run -it -v "$PWD":/go/src/github.com/ardanlabs/gotraining ardanlabs-gotraining
# or start container with downloaded gotraining in the image
docker run -it ardanlabs-gotraining

Remove gotraining container and image

docker rm -f $(docker ps -a | grep ardanlabs-gotraining | awk '{print $1}')
docker rmi -f $(docker images -a | grep ardanlabs-gotraining | awk '{print $1}')

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

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
courses
intro/quick/hello
Sample program to show off Go and check programming environment.
Sample program to show off Go and check programming environment.
intro/quick/helloHTTP
Sample program to show off Go and check programming environment.
Sample program to show off Go and check programming environment.
one-day-overview/misc/curl1
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.
one-day-overview/misc/curl2
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.
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.
tools
mpl
Package main provides a CLI tool to automatically update Go Playground links within a training markdown file
Package main provides a CLI tool to automatically update Go Playground links within a training markdown file
topics
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.
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.
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.
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.
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.
benchmarking/caching
package caching provides code to show why Data Oriented Design matters.
package caching provides code to show why Data Oriented Design matters.
benchmarking/profiling
Test program for the benchmark example.
Test program for the benchmark example.
channels/advanced/example1
Sample program to show the order of channel communication for unbuffered, buffered and closing channels based on the specification.
Sample program to show the order of channel communication for unbuffered, buffered and closing channels based on the specification.
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.
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.
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.
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.
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.
channels/exercises/exercise2
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
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.
channels/exercises/template2
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
Write a program that uses a fan out pattern to generate 100 random numbers concurrently.
cli/cobra
This program provides a sample building cli tooling.
This program provides a sample building cli tooling.
composition/example1
Sample program demonstrating struct composition.
Sample program demonstrating struct composition.
composition/example2
Sample program demonstrating decoupling with interfaces.
Sample program demonstrating decoupling with interfaces.
composition/example3
Sample program demonstrating interface composition.
Sample program demonstrating interface composition.
composition/example4
Sample program demonstrating decoupling with interface composition.
Sample program demonstrating decoupling with interface composition.
composition/example5
Sample program demonstrating when implicit interface conversions are provided by the compiler.
Sample program demonstrating when implicit interface conversions are provided by the compiler.
composition/example6
Sample program demonstrating that type assertions are a runtime and not compile time construct.
Sample program demonstrating that type assertions are a runtime and not compile time construct.
composition/example7
Sample program to show how you can personally mock concrete types when you need to for your own packages or tests.
Sample program to show how you can personally mock concrete types when you need to for your own packages or tests.
composition/example7/pubsub
Package pubsub simulates a package that provides publication/subscription type services.
Package pubsub simulates a package that provides publication/subscription type services.
composition/exercises/exercise1
Using the template, declare a set of concrete types that implement the set of predefined interface types.
Using the template, declare a set of concrete types that implement the set of predefined interface types.
concurrency_patterns/chat
Package chat implements a basic chat room.
Package chat implements a basic chat room.
concurrency_patterns/chat/main
This sample program demonstrates how to create a simple chat system.
This sample program demonstrates how to create a simple chat system.
concurrency_patterns/logger
Package logger shows a pattern of using a buffer to handle log write continuity but deal with write latencies by throwing away log data.
Package logger shows a pattern of using a buffer to handle log write continuity but deal with write latencies by throwing away log data.
concurrency_patterns/logger/main
This sample program demonstrates how the logger package works.
This sample program demonstrates how the logger package works.
concurrency_patterns/pool
Package pool manages a user defined set of resources.
Package pool manages a user defined set of resources.
concurrency_patterns/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.
concurrency_patterns/task
Package task provides a pool of goroutines to perform tasks.
Package task provides a pool of goroutines to perform tasks.
concurrency_patterns/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.
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.
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.
constants/exercises/exercise1
Declare an untyped and typed constant and display their values.
Declare an untyped and typed constant and display their values.
constants/exercises/template1
Declare an untyped and typed constant and display their values.
Declare an untyped and typed constant and display their values.
data_race/advanced/example1
Sample program to show a more complicated race condition using an interface value.
Sample program to show a more complicated race condition using an interface value.
data_race/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.
data_race/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.
data_race/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.
data_race/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.
data_race/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.
data_race/exercises/exercise1
Answer for exercise 1 of Race Conditions.
Answer for exercise 1 of Race Conditions.
data_race/exercises/template1
Fix the race condition in this program.
Fix the race condition in this program.
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.
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.
embedding/example3
Sample program to show how embedded types work with interfaces.
Sample program to show how embedded types work with interfaces.
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.
embedding/exercises/exercise1
Copy the code from the template.
Copy the code from the template.
embedding/exercises/template1
Copy the code from the template.
Copy the code from the template.
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.
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.
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.
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.
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.
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.
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.
error_handling/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.
error_handling/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.
error_handling/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.
error_handling/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.
error_handling/example5/reason
Sample program to show see if the class can find the bug.
Sample program to show see if the class can find the bug.
error_handling/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.
error_handling/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.
error_handling/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.
error_handling/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.
exporting/example1
Sample program to show how to access an exported identifier.
Sample program to show how to access an exported identifier.
exporting/example1/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
exporting/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.
exporting/example2/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
exporting/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.
exporting/example3/counters
Package counters provides alert counter support.
Package counters provides alert counter support.
exporting/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.
exporting/example4/users
Package users provides support for user management.
Package users provides support for user management.
exporting/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.
exporting/example5/users
Package users provides support for user management.
Package users provides support for user management.
exporting/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.
exporting/exercises/exercise1/toy
Package toy contains support for managing toy inventory.
Package toy contains support for managing toy inventory.
exporting/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.
exporting/exercises/template1/toy
Package toy contains support for managing toy inventory.
Package toy contains support for managing toy inventory.
functions/advanced/example1
Sample program to show how to recover from panics.
Sample program to show how to recover from panics.
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.
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.
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.
functions/example4
Sample program to show how anonymous functions and closures work.
Sample program to show how anonymous functions and closures work.
functions/exercises/exercise1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.
functions/exercises/template1
Declare a struct type to maintain information about a user.
Declare a struct type to maintain information about a user.
fuzzing/example1
Package api provides an example on how to use go-fuzz.
Package api provides an example on how to use go-fuzz.
fuzzing/exercises/exercise1
Package fuzzprot provides the ability to unpack user values from our binary protocol.
Package fuzzprot provides the ability to unpack user values from our binary protocol.
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.
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.
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.
goroutines/exercises/exercise1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
goroutines/exercises/template1
Create a program that declares two anonymous functions.
Create a program that declares two anonymous functions.
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.
http/api/app
Package app provides application support for context and MongoDB access.
Package app provides application support for context and MongoDB access.
http/api/handlers
Package handlers contains the handler logic for processing requests.
Package handlers contains the handler logic for processing requests.
http/api/models
Package models contains data structures and associated behavior
Package models contains data structures and associated behavior
http/api/services
Package services provides business and data processing.
Package services provides business and data processing.
http/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.
http/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.
http/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.
interfaces/advanced/example1
Sample program that explores how interface assignments work when values are stored inside the interface.
Sample program that explores how interface assignments work when values are stored inside the interface.
interfaces/example1
Sample program to show how polymorphic behavior with interfaces.
Sample program to show how polymorphic behavior with interfaces.
interfaces/example2
Sample program to show how to understand method sets.
Sample program to show how to understand method sets.
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.
interfaces/example4
Sample program to show how method sets can affect behavior.
Sample program to show how method sets can affect behavior.
interfaces/example5
Sample program to show how the concrete value assigned to the interface is what is stored inside the interface.
Sample program to show how the concrete value assigned to the interface is what is stored inside the interface.
interfaces/exercises/exercise1
Declare an interface named speaker with a method named speak.
Declare an interface named speaker with a method named speak.
interfaces/exercises/template1
Declare an interface named speaker with a method named speak.
Declare an interface named speaker with a method named speak.
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.
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.
logging/exercises/exercise1
Setup a new program to use the log package.
Setup a new program to use the log package.
logging/exercises/template1
Setup a new program to use the log package.
Setup a new program to use the log package.
maps/advanced/example1
Sample program to show how to compose maps of maps.
Sample program to show how to compose maps of maps.
maps/advanced/example2
Sample program to show the properties of nil maps.
Sample program to show the properties of nil maps.
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.
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.
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.
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.
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.
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.
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.
methods/example3
Sample program to show how to declare function variables.
Sample program to show how to declare function variables.
methods/example4
Sample program to show how to declare and use function types.
Sample program to show how to declare and use function types.
methods/exercises/exercise1
Declare a struct that represents a baseball player.
Declare a struct that represents a baseball player.
methods/exercises/template1
Declare a struct that represents a baseball player.
Declare a struct that represents a baseball player.
nats/basic/async
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
nats/basic/channels
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
nats/basic/queue
Sample program to show to using the queuing functionality to allow a round robin of services to handle messages.
Sample program to show to using the queuing functionality to allow a round robin of services to handle messages.
nats/basic/request
Sample program to show to connect and publish/subscribe requests.
Sample program to show to connect and publish/subscribe requests.
nats/basic/sync
Sample program to show to connect and publish/subscribe for messages.
Sample program to show to connect and publish/subscribe for messages.
nats/chat
Sample program to show how to build a very basic chat client using NATS.
Sample program to show how to build a very basic chat client using NATS.
nats/services/basic/db
All material is licensed under the Apache License Version 2.0, January 2004 http://www.apache.org/licenses/LICENSE-2.0 Sample program to show what a basic web service might look like.
All material is licensed under the Apache License Version 2.0, January 2004 http://www.apache.org/licenses/LICENSE-2.0 Sample program to show what a basic web service might look like.
nats/services/basic/web
All material is licensed under the Apache License Version 2.0, January 2004 http://www.apache.org/licenses/LICENSE-2.0 Sample program to show what a basic web service might look like.
All material is licensed under the Apache License Version 2.0, January 2004 http://www.apache.org/licenses/LICENSE-2.0 Sample program to show what a basic web service might look like.
pointers/example1
Sample program to show the basic concept of pass by value.
Sample program to show the basic concept of pass by value.
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.
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.
pointers/example4
Sample program to show variables stay on or escape from the stack.
Sample program to show variables stay on or escape from the stack.
pointers/example5
Sample program to show how stacks grow/change.
Sample program to show how stacks grow/change.
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.
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.
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.
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.
profiling/godebug/gctrace
Sample program to see what a memory leak looks like.
Sample program to see what a memory leak looks like.
profiling/godebug/schedtrace
Sample program that implements a simple web service that will allow us to explore how to use the schedtrace.
Sample program that implements a simple web service that will allow us to explore how to use the schedtrace.
profiling/project
This program provides a sample web service that uses concurrency and channels to perform a coordinated set of asynchronous searches.
This program provides a sample web service that uses concurrency and channels to perform a coordinated set of asynchronous searches.
profiling/project/search
Package search manages the searching of results against different news feeds.
Package search manages the searching of results against different news feeds.
profiling/project/service
Package service maintains the logic for the web service.
Package service maintains the logic for the web service.
receiver_choices/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.
receiver_choices/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.
reflection/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.
reflection/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.
reflection/inspect/integer
Example shows how to use reflection to decode an integer.
Example shows how to use reflection to decode an integer.
reflection/inspect/struct
Example shows how to inspect a structs fields and display the field name, type and value.
Example shows how to inspect a structs fields and display the field name, type and value.
reflection/interface/map
Example shows how to reflect over a map of struct type values that are stored inside an interface value.
Example shows how to reflect over a map of struct type values that are stored inside an interface value.
reflection/interface/pointer
Example shows how to reflect over a struct type pointer that is stored inside an interface value.
Example shows how to reflect over a struct type pointer that is stored inside an interface value.
reflection/interface/slice
Example shows how to reflect over a slice of struct type values that are stored inside an interface value.
Example shows how to reflect over a slice of struct type values that are stored inside an interface value.
reflection/interface/struct
Example shows how to reflect over a struct type value that is stored inside an interface value.
Example shows how to reflect over a struct type value that is stored inside an interface value.
reflection/tag
Example shows how to reflect on a struct type with tags.
Example shows how to reflect on a struct type with tags.
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.
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.
slices/example2
Sample program to show the components of a slice.
Sample program to show the components of a slice.
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.
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.
slices/example5
Sample program to show how one needs to be careful when appending to a slice when you have a reference to an element.
Sample program to show how one needs to be careful when appending to a slice when you have a reference to an element.
slices/example6
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.
slices/example7
Sample program to show how to declare and use variadic functions.
Sample program to show how to declare and use variadic functions.
slices/exercises/exercise1
Declare a nil slice of integers.
Declare a nil slice of integers.
slices/exercises/template1
Declare a nil slice of integers.
Declare a nil slice of integers.
stack_trace/example1
Sample program to show how to read a stack trace.
Sample program to show how to read a stack trace.
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.
struct_types/advanced/example1
Sample program to show how struct types align on boundaries.
Sample program to show how struct types align on boundaries.
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.
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.
struct_types/example3
Sample program to show how variables of an unnamed type can be assigned to variables of a named type, when they are identical.
Sample program to show how variables of an unnamed type can be assigned to variables of a named type, when they are identical.
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).
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).
testing/example4
Sample program that implements a simple web service.
Sample program that implements a simple web service.
testing/example4/handlers
Package handlers provides the endpoints for the web service.
Package handlers provides the endpoints for the web service.
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.
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.
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.
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.
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.
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.
variables/example1
Sample program to show how to declare variables.
Sample program to show how to declare variables.
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.
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.
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.
writers_readers/advanced/example2
Sample program that adds a few more features.
Sample program that adds a few more features.
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.
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.
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.
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.
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.

Jump to

Keyboard shortcuts

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