Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Collection of Simple Example go Programs.

Octocat-spinner-32 arrays Add godoc information. July 01, 2012
Octocat-spinner-32 chanasyn Add godoc information. July 01, 2012
Octocat-spinner-32 chanfan01
Octocat-spinner-32 chanfan02
Octocat-spinner-32 chanfan03 Example code using channels based on Google I/O 2012 concurrency pres… July 08, 2012
Octocat-spinner-32 chanfan04 Example code using channels based on Google I/O 2012 concurrency pres… July 08, 2012
Octocat-spinner-32 chanfan05 Example code using channels based on Google I/O 2012 concurrency pres… July 08, 2012
Octocat-spinner-32 chanfan06
Octocat-spinner-32 chanfan07
Octocat-spinner-32 chanfan08 Example code using channels based on Google I/O 2012 concurrency pres… July 08, 2012
Octocat-spinner-32 chanloop
Octocat-spinner-32 chanrange Add godoc information. July 01, 2012
Octocat-spinner-32 chanshunt Example code using channels based on Google I/O 2012 concurrency pres… July 08, 2012
Octocat-spinner-32 chanshunt_2 Channel shunt example, many comments. February 28, 2013
Octocat-spinner-32 chansvr1 Add godoc information. July 01, 2012
Octocat-spinner-32 chansvr2
Octocat-spinner-32 chansyn Add godoc information. July 01, 2012
Octocat-spinner-32 chantest
Octocat-spinner-32 charshow
Octocat-spinner-32 dateshow
Octocat-spinner-32 defer
Octocat-spinner-32 dtemplex1
Octocat-spinner-32 dtemplex2 gofmt for lastest example. August 27, 2012
Octocat-spinner-32 envshow
Octocat-spinner-32 errtest
Octocat-spinner-32 fib Add godoc information. July 01, 2012
Octocat-spinner-32 fib_embellished
Octocat-spinner-32 fib_userop
Octocat-spinner-32 fileread Clarify file read with different line ends. February 02, 2014
Octocat-spinner-32 filescan
Octocat-spinner-32 flagdemo Add godoc information. July 01, 2012
Octocat-spinner-32 force_type Add godoc information. July 01, 2012
Octocat-spinner-32 func_lit Add godoc information. July 01, 2012
Octocat-spinner-32 func_ret Add godoc information. July 01, 2012
Octocat-spinner-32 gio12gs01 More sample code from Google I/O 2112, concurrency related. July 08, 2012
Octocat-spinner-32 gio12gs02 More sample code from Google I/O 2112, concurrency related. July 08, 2012
Octocat-spinner-32 gio12gs03
Octocat-spinner-32 gio12gs04
Octocat-spinner-32 gio12gs05 More sample code from Google I/O 2112, concurrency related. July 08, 2012
Octocat-spinner-32 gobdemo
Octocat-spinner-32 gorsynchs Add godoc information. July 01, 2012
Octocat-spinner-32 gortns01
Octocat-spinner-32 greddit
Octocat-spinner-32 gt044 Add godoc information. July 01, 2012
Octocat-spinner-32 gt045 Add godoc information. July 01, 2012
Octocat-spinner-32 hello Add godoc information. July 01, 2012
Octocat-spinner-32 hello_small Add godoc information. July 01, 2012
Octocat-spinner-32 httpserv
Octocat-spinner-32 interface_01 Add godoc information. July 01, 2012
Octocat-spinner-32 interface_02 Add godoc information. July 01, 2012
Octocat-spinner-32 interface_03
Octocat-spinner-32 interface_04
Octocat-spinner-32 interface_04a Twist on previous example with interface name explicitly coded in str… July 01, 2012
Octocat-spinner-32 interface_04b Interface example embellished, use slice instead of array. July 01, 2012
Octocat-spinner-32 list
Octocat-spinner-32 list_struct
Octocat-spinner-32 loghello Add godoc information. July 01, 2012
Octocat-spinner-32 maps
Octocat-spinner-32 maps_merge
Octocat-spinner-32 maps_ss Add godoc information. July 01, 2012
Octocat-spinner-32 methods Add godoc information. July 01, 2012
Octocat-spinner-32 netcon Add godoc information. July 01, 2012
Octocat-spinner-32 numbers Add godoc information. July 01, 2012
Octocat-spinner-32 numconv Add godoc information. July 01, 2012
Octocat-spinner-32 oltesta Add godoc information. July 01, 2012
Octocat-spinner-32 panrecov Panic, recover and display stacktrace, from the net. July 06, 2013
Octocat-spinner-32 rand_between Embellish random number example, add benchmarks. February 17, 2014
Octocat-spinner-32 rangecopy
Octocat-spinner-32 ranges Add godoc information. July 01, 2012
Octocat-spinner-32 recover A recover example. January 19, 2013
Octocat-spinner-32 runpprof
Octocat-spinner-32 shax
Octocat-spinner-32 shifter Add shift display program. August 15, 2012
Octocat-spinner-32 show64 Simple base64 encode / decode demonstration. December 28, 2012
Octocat-spinner-32 showallocs Some additional examples. September 17, 2012
Octocat-spinner-32 showgo Add os information to showgo. July 01, 2012
Octocat-spinner-32 showmac Add godoc information. July 01, 2012
Octocat-spinner-32 showpprof
Octocat-spinner-32 showsetcpus Some additional examples. September 17, 2012
Octocat-spinner-32 showtime Add godoc information. July 01, 2012
Octocat-spinner-32 sigshow oops - gofmt on signal demo December 27, 2012
Octocat-spinner-32 sl3index
Octocat-spinner-32 slappmult
Octocat-spinner-32 sliceappt Reformat source showing call chaining. December 15, 2012
Octocat-spinner-32 slices
Octocat-spinner-32 sltricks Add godoc information. July 01, 2012
Octocat-spinner-32 ssl
Octocat-spinner-32 stomptest
Octocat-spinner-32 stringlens
Octocat-spinner-32 strings_utils
Octocat-spinner-32 struct Add godoc information. July 01, 2012
Octocat-spinner-32 switch_demo
Octocat-spinner-32 symlshow Add godoc information. July 01, 2012
Octocat-spinner-32 symltest
Octocat-spinner-32 tcp01 Add godoc information. July 01, 2012
Octocat-spinner-32 tcp02 Add godoc information. July 01, 2012
Octocat-spinner-32 tcp03
Octocat-spinner-32 tcp04 Add godoc information. July 01, 2012
Octocat-spinner-32 tcp05
Octocat-spinner-32 tcp06 Display remote address. December 30, 2012
Octocat-spinner-32 testgreek
Octocat-spinner-32 testppack Add godoc information. July 01, 2012
Octocat-spinner-32 type_String Add godoc information. July 01, 2012
Octocat-spinner-32 unicloup Add godoc information. July 01, 2012
Octocat-spinner-32 unicode_what Cedilla example message clarify. November 18, 2012
Octocat-spinner-32 uniques
Octocat-spinner-32 utfconv
Octocat-spinner-32 xmlshow01 Additional display of unmarshalled XML. August 26, 2012
Octocat-spinner-32 xmlshow02 Another XML example, somewhat like go issue 3688. September 02, 2012
Octocat-spinner-32 xmlshow03
Octocat-spinner-32 .gitignore Update ignore list. October 18, 2010
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.mdown
README.mdown

Project go-samp, Samples of Simple go Language Programs

This is a collection of extremely simple examples of using the go programming language.

These samples were inspired primarily by the GoCourseDay#.pdf files previously available in the go distrubution. And some additional experiments. In particular experiments triggered by documentation provided in the go distribution.

Prerequisites

In essence, you need a working go environment, and a few small additions.

At the current HEAD of master, your go build should be at least: weekly.2012-02-07.

You need certain basic functions available to you in order to build and run these go programs.

These include:

  • the go compiler
  • the go linker
  • make

If you are not familiar with go, and want to install it and learn the language, see:

Additional Setup

In order to use the make system for these samples, you will need to have the $GOPATH environment variable properly defined. See the go documentation for details.

Although this system is still installed using make, the 'go' tool is used under the covers. If you require previous versions, please examine previous tags.

Adjust $GOPATH as necessary for your system.

Install

To install all these samples:

  • clone from or fork on github
  • cd to your base git repo directory
  • make packages
  • make

Other Education Resources

Something went wrong with that request. Please try again.