Welcome to my GoLang Context learning repository! This repository is dedicated to understanding and mastering the context
package in the Go programming language. The context
package provides a powerful tool for managing and propagating cancellation, timeouts, and values in your Go programs.
The repository includes the following:
- Examples: A directory containing practical code examples that demonstrate the usage of the
context
package for different scenarios. - Exercises: A set of coding exercises designed to reinforce your understanding of the
context
package. - Contributing: Guidelines for contributing to this repository if you're interested in collaborating.
To get started with learning about the context
package in Go, you'll need to have Go installed on your machine. You can download the latest version of Go from the official Go website.
Once you have Go installed, you can clone this repository using the following command:
git clone https://github.com/fadhlidev/golang-context.git
All the examples here are written as test files. To run the examples, navigate to the relevant directory and execute the Go files using the go test
command. For instance, if you want to run an example named example.go
, use the following command:
go test example.go
Feel free to explore the examples, modify the code, and experiment with different scenarios to deepen your understanding of Goroutines.
If you'd like to contribute to this repository, you're more than welcome! Contributions can be made in the form of bug fixes, adding new examples, improving documentation, or suggesting new exercises. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your contribution.
- Make your changes or additions.
- Commit your changes with descriptive commit messages.
- Push your changes to your forked repository.
- Open a pull request, providing a clear description of your changes.
Your contributions help make this repository a valuable resource for the Go community. Thank you for your support!
This repository is licensed under the MIT License. Feel free to use the code examples, utilities, and exercises in this repository in your own projects.