Welcome to your Go coding challenges! These exercises are designed to test your understanding of Go basics, data structures, structs, and standard libraries.
- Navigate to the
challengesdirectory. - Open each file (e.g.,
basics.go) and read the comments to understand the task. - Implement the function marked with
TODO. - Run the tests to verify your solution.
To run all tests:
go test ./challenges/...To run tests for a specific challenge (e.g., basics):
go test ./challenges/basics.go ./challenges/basics_test.go
# OR simply inside the directory
go test -v -run TestProcessNumbers ./challenges- Basics (
basics.go): Work with slices, loops, and basic arithmetic. - Data Structures (
structures.go): Use maps and string manipulation to count word frequencies. - Structs & Methods (
structs.go): Build a simple inventory system using structs and methods. - Standard Libraries (
libraries.go): Parse log entries usingtimeandstringspackages.
Good luck!