chore: add markdownlint configuration and update README for installation instructions
This commit is contained in:
parent
da5b65b582
commit
14f38b792d
8
.markdownlint.json
Normal file
8
.markdownlint.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD013": false,
|
||||||
|
"MD026": false,
|
||||||
|
"MD033": false,
|
||||||
|
"MD040": false,
|
||||||
|
"MD041": false
|
||||||
|
}
|
||||||
19
README.md
19
README.md
@ -10,31 +10,40 @@ Before proceeding, make sure you have the following installed on your computer:
|
|||||||
## Steps to Install Go 1.24.0
|
## Steps to Install Go 1.24.0
|
||||||
|
|
||||||
### For Windows:
|
### For Windows:
|
||||||
|
|
||||||
1. Download the installer from [official Go website](https://golang.org/dl/).
|
1. Download the installer from [official Go website](https://golang.org/dl/).
|
||||||
2. Run the downloaded `.msi` file and follow the installation wizard.
|
2. Run the downloaded `.msi` file and follow the installation wizard.
|
||||||
3. During installation, you may be prompted to set the `GOPATH` and `GOROOT`. Choose the appropriate settings
|
3. During installation, you may be prompted to set the `GOPATH` and `GOROOT`. Choose the appropriate settings
|
||||||
based on your preference or keep the default values.
|
based on your preference or keep the default values.
|
||||||
|
|
||||||
### For macOS:
|
### For macOS:
|
||||||
|
|
||||||
1. Open Terminal.
|
1. Open Terminal.
|
||||||
2. Download the package using Homebrew (if not installed, visit [Homebrew website](https://brew.sh/) for
|
2. Download the package using Homebrew (if not installed, visit [Homebrew website](https://brew.sh/) for
|
||||||
installation instructions):
|
installation instructions):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install go@1.24
|
brew install go@1.24
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Link the installed version to your PATH:
|
3. Link the installed version to your PATH:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew link --overwrite --force go@1.24
|
brew link --overwrite --force go@1.24
|
||||||
```
|
```
|
||||||
|
|
||||||
### For Linux:
|
### For Linux:
|
||||||
|
|
||||||
1. Open Terminal.
|
1. Open Terminal.
|
||||||
2. Download the appropriate tarball from [official Go website](https://golang.org/dl/).
|
2. Download the appropriate tarball from [official Go website](https://golang.org/dl/).
|
||||||
3. Extract the downloaded archive:
|
3. Extract the downloaded archive:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tar -C /usr/local -xzf go1.24.linux-amd64.tar.gz
|
tar -C /usr/local -xzf go1.24.linux-amd64.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Add Go to your PATH by editing your shell configuration file (e.g., `.bashrc`, `.zshrc`):
|
4. Add Go to your PATH by editing your shell configuration file (e.g., `.bashrc`, `.zshrc`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
|
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
@ -43,18 +52,22 @@ installation instructions):
|
|||||||
## Verify Installation
|
## Verify Installation
|
||||||
|
|
||||||
After installation, verify that Go 1.24.0 is installed correctly by running:
|
After installation, verify that Go 1.24.0 is installed correctly by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go version
|
go version
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see an output like `go version go1.24 darwin/amd64` (or similar, depending on your OS).
|
You should see an output like `go version go1.24 darwin/amd64` (or similar, depending on your OS).
|
||||||
|
|
||||||
## Install Make (if not already installed)
|
## Install Make (if not already installed)
|
||||||
|
|
||||||
### For Windows:
|
### For Windows:
|
||||||
|
|
||||||
- Download and install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm).
|
- Download and install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm).
|
||||||
- Add the installation directory to your PATH.
|
- Add the installation directory to your PATH.
|
||||||
|
|
||||||
### For macOS:
|
### For macOS:
|
||||||
|
|
||||||
1. Open Terminal.
|
1. Open Terminal.
|
||||||
2. Install Make using Homebrew:
|
2. Install Make using Homebrew:
|
||||||
```bash
|
```bash
|
||||||
@ -62,6 +75,7 @@ You should see an output like `go version go1.24 darwin/amd64` (or similar, depe
|
|||||||
```
|
```
|
||||||
|
|
||||||
### For Linux:
|
### For Linux:
|
||||||
|
|
||||||
Make is usually pre-installed on most Linux distributions. If it's not installed, you can install it using your
|
Make is usually pre-installed on most Linux distributions. If it's not installed, you can install it using your
|
||||||
package manager (e.g., `sudo apt-get install make` for Ubuntu).
|
package manager (e.g., `sudo apt-get install make` for Ubuntu).
|
||||||
|
|
||||||
@ -72,6 +86,7 @@ Open Terminal and navigate to the root directory of your Go project.
|
|||||||
## Resolve Dependencies with `go mod tidy`
|
## Resolve Dependencies with `go mod tidy`
|
||||||
|
|
||||||
Run the following command to download and resolve all dependencies specified in your `go.mod` file:
|
Run the following command to download and resolve all dependencies specified in your `go.mod` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go mod tidy
|
go mod tidy
|
||||||
```
|
```
|
||||||
@ -79,6 +94,7 @@ go mod tidy
|
|||||||
## Setup Database
|
## Setup Database
|
||||||
|
|
||||||
In your Go application, you'll need to set the following environment variables to connect to your database:
|
In your Go application, you'll need to set the following environment variables to connect to your database:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
DB_HOST: The hostname or IP address of your database server (e.g., localhost, 127.0.0.1, or the actual DB server URL).
|
DB_HOST: The hostname or IP address of your database server (e.g., localhost, 127.0.0.1, or the actual DB server URL).
|
||||||
DB_USER: The username for your database connection.
|
DB_USER: The username for your database connection.
|
||||||
@ -103,6 +119,7 @@ Make sure to replace the values with your actual database details.
|
|||||||
## Build the Binary Using `make build`
|
## Build the Binary Using `make build`
|
||||||
|
|
||||||
Run the following command to build your project. The binary will be placed in the `bin` folder.
|
Run the following command to build your project. The binary will be placed in the `bin` folder.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
@ -110,6 +127,7 @@ make build
|
|||||||
## Run the Program Using `make run`
|
## Run the Program Using `make run`
|
||||||
|
|
||||||
Finally, you can run your program using:
|
Finally, you can run your program using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make run
|
make run
|
||||||
```
|
```
|
||||||
@ -120,6 +138,7 @@ This command will compile and execute your Go application.
|
|||||||
|
|
||||||
**Note:** Ensure that your `Makefile` is correctly set up to handle these commands. If not, you may need to create
|
**Note:** Ensure that your `Makefile` is correctly set up to handle these commands. If not, you may need to create
|
||||||
or adjust it accordingly.
|
or adjust it accordingly.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Please follow the above instructions to set up Go version 1.24.0, manage dependencies using `go mod tidy`, build a
|
Please follow the above instructions to set up Go version 1.24.0, manage dependencies using `go mod tidy`, build a
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user