Skip to content

KrisMatrix/Golang_Exercises

Repository files navigation

Go language Exercises

This repository showcases my golanguage programming. This is based on Mark McGranaghan's GoByExample site (https://gobyexample.com). I basically learned Go through his examples.

Program_File Description
hello.go Print Hello World
values.go Prints data of various formats
variables.go Store values in variable and print
constant.go Use of constants (immutable)
for.go for loop example
if.go if/else example
switch.go case/switch example
arrays.go arrays example
slices.go slices example
range.go range iteration example
functions.go functions example
multiple-return-values.go functions with multple values returned
variadic-functions.go functions can be called with any number of trailing args
closures.go anonymous functions example
recursion.go recursive functions example
pointers.go pointers allow references to values & records
structs.go structs are typed collection of fields
methods.go methods defined on struct types
interfaces.go interfaces are named collections of method signatures
errors.go return errors example
goroutines.go goroutine is a lightweight thread of execution.
channels.go pipes that connect concurrent goroutines
channel-buffering.go channel buffering example
channel-synchronization.go use channels to sync execution across go routines
channel-directions.go channels as func parameters
select.go select lets you wait on multiple channel ops
timeouts.go Timeouts are important for programs that connect to external resources or that otherwise need to bound execution time.
non-blocking channel
Closing Channels
Range over Channels
Timers
Tickers
Worker Pools
WaitGroups
Rate Limiting
Atomic Counters
Mutexes
Stateful Goroutines
Sorting
Sorting by Functions
panic.go panic typically means something went unexpectedly.
defer.go defer is used to ensure that a func call is done later
Collection Functions
string-functions.go functions with strings
string-formatting.go formatting strings example
regular-expressions.go
json.go json example
XML
time.go time module example
epoch.go epoch seconds example
Time Formatting / Parsing
Random Numbers
Number Parsing
URL Parsing
sha1-hashes.go SHA1 crypto hash example
Base64 Encoding
reading-files.go reading a file example
writing-files.go Writing Files example
Line Filters
File Paths
Directories
Temporary Files and Directories
Testing
command-line-arguments.go
command-line-flags.go
command-line-subcommads.go
environment-variables.go Access env variables example
http-clients.go http client application
http-servers.go http server application
Context
Spawning Processes
Exec'ing Processes
Signals
exit.go exit example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages