Skip to content

Commit

Permalink
docs: update contribution guide with new Golang version and coverage …
Browse files Browse the repository at this point in the history
…requirements

- Update required Golang version from 1.19+ to 1.22+
- Adjust pull request coverage requirement from 70% to 60%

These changes ensure that the documentation reflects the current development environment requirements and project standards.
  • Loading branch information
elliotxx committed Jan 3, 2025
1 parent d215d02 commit 52631e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ This guide will help you get started with Karpor development.

### Prerequisites

* Golang version 1.19+
* Golang version 1.22+

<details>
<summary>Installing Golang</summary>

1. Install go1.19+ from the [official website](https://go.dev/dl/). Extract the binary files and place them at a location, assuming it is located under the home directory `~/go/`, here is an example command, you should choose the correct binary file for your system.
1. Install go1.22+ from the [official website](https://go.dev/dl/). Extract the binary files and place them at a location, assuming it is located under the home directory `~/go/`, here is an example command, you should choose the correct binary file for your system.

```
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
tar xzf go1.20.2.linux-amd64.tar.gz
```

If you would like to maintain multiple versions of golang in your local development environment, you can download the package and extract it to a location, like `~/go/go1.19.1`, and then alter the path in the command below accordingly.
If you would like to maintain multiple versions of golang in your local development environment, you can download the package and extract it to a location, like `~/go/go1.22.1`, and then alter the path in the command below accordingly.

1. Set environment variables for Golang

Expand Down Expand Up @@ -160,7 +160,7 @@ Make sure your pull request title uses the same format as the commit message sub

Before merging, all testing CIs should pass:

- Coverage should not drop. Currently, the pull request coverage should be at least 70%.
- Coverage should not drop. Currently, the pull request coverage should be at least 60%.
- Karpor uses a **CLA** for the contributor agreement. It requires you to sign for every commit before merging the pull request.

## Updating Documentation and Website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ title: 代码贡献指南

### 前提条件

* Golang 版本 1.19+
* Golang 版本 1.22+

<details>
<summary>安装 Golang</summary>

1.[官方网站](https://go.dev/dl/) 安装 golang 1.19+。解压二进制文件并放置到某个位置,假设该位置是 home 目录下的 `~/go/`,下面是一个示例命令,你应当选择适合你系统的正确二进制文件。
1.[官方网站](https://go.dev/dl/) 安装 golang 1.22+。解压二进制文件并放置到某个位置,假设该位置是 home 目录下的 `~/go/`,下面是一个示例命令,你应当选择适合你系统的正确二进制文件。

```
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
tar xzf go1.20.2.linux-amd64.tar.gz
```

如果你想在本地开发环境维护多个 golang 版本,你可以下载包并解压到某个位置,比如 `~/go/go1.19.1`,然后根据下面的命令相应地改变路径。
如果你想在本地开发环境维护多个 golang 版本,你可以下载包并解压到某个位置,比如 `~/go/go1.22.1`,然后根据下面的命令相应地改变路径。

1. 为 Golang 设置环境变量

Expand Down Expand Up @@ -160,7 +160,7 @@ Pull request 的标题将会成为合并后的 commit 信息的描述。

在合并之前,所有的测试 CI 都应该通过:

- 覆盖率不应该下降。当前,pull request 的覆盖率应当至少为 70%。
- 覆盖率不应该下降。当前,pull request 的覆盖率应当至少为 60%。
- Karpor 使用 **CLA** 作为贡献者协议。它要求你在第一次合并 pull request 之前签署。

## 更新文档和网站
Expand Down

0 comments on commit 52631e1

Please sign in to comment.