go-excercises

module
v0.0.0-...-a716749 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0

README

Go Excercises

Go excercises from the book "The Go Programming Language - Alan A. A. Donovan and Brian Kernighan"

Directories

Path Synopsis
ch01
01-echo-args
echo_args prints all the command line arguments separated by space
echo_args prints all the command line arguments separated by space
02-echo-args-with-index
echo_args_with_index prints all the command line arguments separated by space
echo_args_with_index prints all the command line arguments separated by space
03-benchmark-echo
benchmark_echo measures the performance of Go code
benchmark_echo measures the performance of Go code
04-find-dup
find_dup reads the lines from given input file(s) or from the standard input, prints only the duplicate lines.
find_dup reads the lines from given input file(s) or from the standard input, prints only the duplicate lines.
05-lissajous
lissajous generates a gif with lissajous effects
lissajous generates a gif with lissajous effects
06-lissajous-colorful
lissajous generates a gif with lissajous effects
lissajous generates a gif with lissajous effects
07-fetch-url
fetch_url fetches the given URL and prints the output
fetch_url fetches the given URL and prints the output
08-fetch-url-v2
fetch_url_v2 fetches the given URL and prints the output.
fetch_url_v2 fetches the given URL and prints the output.
09-fetch-url-v3
fetch_url_v3 fetches the given URL and prints the output.
fetch_url_v3 fetches the given URL and prints the output.
10-fetch-urls
fetch_urls fetches the given URLs concurrently and prints the output The total time of execution is equal to the longest time taken for a single URL
fetch_urls fetches the given URLs concurrently and prints the output The total time of execution is equal to the longest time taken for a single URL
12-web-server
web_server listens on localhost:8000 and generates the lissajous images based on the parameters For example:
web_server listens on localhost:8000 and generates the lissajous images based on the parameters For example:
ch02
01-tempconv/tempconv
Package tempconv converts the temperate between different scales:
Package tempconv converts the temperate between different scales:
02-conv
conv is a general purpose unit conversion utility that supports: - length: feet and meters - mass: kilogram and pounds - temperature: celsius and fahrenheit
conv is a general purpose unit conversion utility that supports: - length: feet and meters - mass: kilogram and pounds - temperature: celsius and fahrenheit
03-popcount
popcount counts the number of bits set (that is 1) in given number This is called population count
popcount counts the number of bits set (that is 1) in given number This is called population count
04-popcount-v2
popcount counts the number of bits set (that is 1) in given number This is called population count
popcount counts the number of bits set (that is 1) in given number This is called population count
05-popcount-v3
popcount counts the number of bits set (that is 1) in given number This is called population count
popcount counts the number of bits set (that is 1) in given number This is called population count
ch03
01-surface
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
05-mandelbrot
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
10-comma
comma inserts a comma after every 3 digits
comma inserts a comma after every 3 digits
11-comma-floats
comma_floats inserts a comma after every 3 digits and works with floats as well
comma_floats inserts a comma after every 3 digits and works with floats as well
12-anagram
anagram finds whether two strings are anagrams.
anagram finds whether two strings are anagrams.
13-storage-units
storageunits demonostrates the defining constants for storage units such as KB and MB
storageunits demonostrates the defining constants for storage units such as KB and MB
ch04
01-sha256-diff
sha256diff produces the 256 bits digest for two different stringsand counts the bits that are different
sha256diff produces the 256 bits digest for two different stringsand counts the bits that are different
02-shadigest
shadigest produces the 256/384/512 bits digest for the given input text
shadigest produces the 256/384/512 bits digest for the given input text
03-reverse-array
reversearray reverses the array [8]int in place
reversearray reverses the array [8]int in place
04-rotate
rotate performs rotations on slice
rotate performs rotations on slice
10-github-search
Issues prints a table of GitHub issues matching the search terms.
Issues prints a table of GitHub issues matching the search terms.
10-github-search/github
Package github provides a Go API for the GitHub issue tracker.
Package github provides a Go API for the GitHub issue tracker.
ch05
ch07
11-inventory-server
server manages the inventory items Start the server and run the following commands in another terminal to access the API
server manages the inventory items Start the server and run the following commands in another terminal to access the API
ch08
01-clockwall/clock
clock serves the time every second through a TCP channel It can produce the time based on the timezone set by environment variable CLOCK_TZ
clock serves the time every second through a TCP channel It can produce the time based on the timezone set by environment variable CLOCK_TZ
01-clockwall/clockwall
clockwall displays multiple clocks for different timezones It is a client that can connect to multiple clock servers serving different timezones
clockwall displays multiple clocks for different timezones It is a client that can connect to multiple clock servers serving different timezones

Jump to

Keyboard shortcuts

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