/golang-Sandbox

golang Sandbox (code examples)

Primary LanguageGo

golang Sandbox (code examples)

This project doesn't have any specifc goals. I aim to use this repository to document any specific problems I face whilst developing in go. I will use this space to experiment with different solutions and verify the behaviour (perhaps incorporating unit tests).


method overloading: overloading.go

A code example demonstrating how to overload a method in golang, this can be useful in test scenarios where using 'live' values is unhelpful; such as time values.

Significantly inspired by Golang Method Override

Try running the command: go run overloading/overloading.go


using generics: generics.go

A code example demonstrating how to use generics.

Try running the command: go run generics/generics.go


cloning: cloning.go

A code example demonstrating how to clone, with a consistent interface.

Try running the command: go run cloning/cloning.go


What problems lie ahead...