项目改名为snippet
This commit is contained in:
parent
40a95aafbc
commit
5f8872cd53
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
#### 组件工具
|
||||
1. 安装
|
||||
> go install myschools.me/suguo/norm/my@latest
|
||||
> go install myschools.me/suguo/snippet/snippet@latest
|
||||
2. 使用
|
||||
> my -dl mysql
|
||||
> snippet -dl mysql
|
||||
|
||||
#### 组件实现
|
||||
* MySQL
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module myschools.me/suguo/norm
|
||||
module myschools.me/suguo/snippet
|
||||
|
||||
go 1.17
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import (
|
|||
)
|
||||
|
||||
const GITEA = "https://myschools.me"
|
||||
const PATH = "/suguo/norm/src/branch/master"
|
||||
const PATH = "/suguo/snippet/src/branch/master"
|
||||
|
||||
var path string
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ func dl(client http.Client, path string, wg *sync.WaitGroup) {
|
|||
func downloadFile(client http.Client, path, filename string, wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
fmt.Println("start to download: ", filename)
|
||||
fileURL := fmt.Sprintf("%s/suguo/norm/raw/branch/master/%s/%s", GITEA, path, filename)
|
||||
fileURL := fmt.Sprintf("%s/suguo/snippet/raw/branch/master/%s/%s", GITEA, path, filename)
|
||||
resp, err := client.Get(fileURL)
|
||||
if err != nil {
|
||||
fmt.Printf("download file %s failed due to: %s\n", filename, err.Error())
|
||||
|
|
@ -3,7 +3,7 @@ package test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"myschools.me/suguo/norm/sqlite"
|
||||
"myschools.me/suguo/snippet/sqlite"
|
||||
)
|
||||
|
||||
type ABC struct {
|
||||
|
|
|
|||
Loading…
Reference in New Issue