63 lines
1.1 KiB
Markdown
63 lines
1.1 KiB
Markdown
## go-git-example
|
||
|
||
### 运行前准备
|
||
|
||
本地搭建gitea环境,注册一个账号
|
||
|
||
这里我注册了一个账号用户名为yystopf,密码为12345678
|
||
|
||
另外运行代码前需要拉取依赖
|
||
```shell
|
||
cd _example
|
||
go mod tidy
|
||
```
|
||
|
||
### 创建文件
|
||
|
||
```shell
|
||
cd _example/operate/create
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678
|
||
```
|
||
|
||
### 删除文件
|
||
|
||
```shell
|
||
cd _example/operate/delete
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678
|
||
```
|
||
|
||
### 查看文件
|
||
|
||
```shell
|
||
cd _example/operate/read
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678
|
||
```
|
||
|
||
### 创建文件夹
|
||
|
||
```shell
|
||
cd _example/operate/create/folder
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678
|
||
```
|
||
|
||
### 删除文件夹
|
||
|
||
```shell
|
||
cd _example/operate/delete/folder
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678
|
||
```
|
||
|
||
### 查看文件夹
|
||
|
||
```shell
|
||
cd _example/operate/read/folder
|
||
# 示例
|
||
go run main.go http://127.0.0.1:10061/yystopf/go-git.git yystopf 12345678 _example
|
||
```
|
||
|
||
### |