Thank you for considering contributing to kubectl-sql! We welcome contributions from everyone. Here are some guidelines to help you get started.
Participating in the development of our project involves forking the repository, setting up your local development environment, making changes, and then proposing those changes via a pull request. Below, we walk through the general steps to get you started!
Fork and Clone: Begin by forking the repository and then clone your fork locally. For step-by-step instructions, check GitHub's guide on forking repositories and cloning repositories.
Copy code
git clone https://github.com/[YourUsername]/kubectl-sql.git
cd kubectl-sql
Remember to replace [YourUsername]
with your GitHub username.
Install Go: Ensure Go is installed on your machine. If not, download it from the official Go site and refer to the installation guide.
Manage Project Dependencies: Navigate to the project directory and manage the dependencies using Go Modules:
go mod tidy
go mod download
Build the project using Go, or make if a Makefile is available, and verify that it runs locally.
make
Now you should be able to execute the binary or utilize the project as per its functionality and options.
Once your environment is set up and running, you’re ready to code!
When you're ready to contribute your changes back to the project:
- Ensure to adhere to the project’s coding standards and guidelines.
- Refer to the GitHub guide for creating a pull request from your fork.
Congratulations, you’re set up for contributing to the project! Always check any additional CONTRIBUTING guidelines provided by the project repository and engage respectfully with the existing community. Happy coding!
Navigating through a project can be quite daunting if you are unfamiliar with its architecture. Here's a brief overview of our Go project structure to get you started:
cmd/
The cmd/
directory contains the application's entry points, essentially harboring the command-line interfaces or executables of the project. Each subdirectory within cmd/
is dedicated to an actionable command that the application can perform.
cmd/kubectl-sql
: This subdirectory holds the source code of the specific command-line user interface. The main function within this directory acts as the entry point to the command.
pkg/
The pkg/
directory encompasses helper modules and libraries that are utilized by the main application and can potentially be shared with other projects. The pkg/
directory is meant to provide a clear distinction between the application code and the auxiliary code that supports it.
It's crucial to recognize that the code within pkg/ should be designed with reusability in mind, avoiding dependencies from your cmd/ directory, ensuring clean and modular code.
Ensure the bug was not already reported by searching on GitHub under Issues. If you're unable to find an open issue addressing the problem, open a new one.
Open a new issue with a detailed explanation of your suggestion.
Begin by looking for good first issues tags in the Issues. Do not work on an issue without expressing interest by commenting on the issue.
- Fork the Repo: Fork the project repository and clone your fork.
- Create a Branch: Make a new branch for your feature or bugfix.
- Commit Your Changes: Make sure your code meets the go style guidelines and add tests for new features.
- Push to Your Fork: And submit a pull request to the main branch.