All samples can be run on a Raspberry Pi or any other Linux system with one exception: trafficLight uses GPIOs which are available on a Raspberry Pi only.
-
blinkAllLEDs - Sample which turns on and off LEDs connected to RaspberryPi GPIOs
-
functions - Sample for go functions
-
geoLocationSunriseSunset - Sample using go http client to retrieve the lattitude and longitude of a passed location and calculation of the local
-
gofunc - go functions used to demonstrate the dining philosophers problem using goroutines, channels and mutex
-
helloWorld - Simple Hello world program
-
highLow - Simple high/low game on command window level
-
highLowGameServer - Simple high/low game server using templates and go http server. IBM Bluemix artefacts to deploy the server on bluemix are included
-
httpsServer - Sample go https server which uses TLS and generates a self signed certificate
-
interfaces - Sample code which demonstrates go interfaces
-
ipLocation - Retrieve location information about the current used IP address via REST call sunrise and sunset time via REST calls
-
loginFritz - Login into an AVM Fritzbox and handle the challenge response. The code retrieves the internet usage counters
-
methods - Sample go code which demonstrates usage of methods
-
trafficLight - traffic light simulation of two trafficlights using channels and go routines. Can use real LEDs on a Raspberry using GPIOs and/or simulate LEDs on a monitor. See here a small video.
-
types - Samples for the different types in go
-
utf8 - Sample for utf8 handling in go
-
genSitemap - Sample how to use go lightweight threading (goroutines). Actually it's a remote website crawler which generates a sitemap.xml.
Following information is crawled and reported. The number and URL of
- valid links to remote wabpages
- invalid remote links to remote webpages
- dead links
- valid links for a sitemap
- number of crawled pages
This information then is used to compile a sitemap. Used by the author for his websites.