Skip to content

Commit

Permalink
chore: 更新 assert 至 v4
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Feb 28, 2024
1 parent ab52f8a commit 8619268
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
go: ['1.17.x', '1.20.x']
go: ['1.17.x', '1.22.x']

steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go
Expand Down
19 changes: 11 additions & 8 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// SPDX-FileCopyrightText: 2015-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package upload 提供文件上传的功能
//
// 处理上传文件,若是图片还可以设置水印。
// func(w http.ResponseWriter, r *http.Request) {
// u, err := upload.New("~/uploads/", 1024*1024*10, ".txt", ".jpg", ".png")
// u.SetWatermarkFile(...) // 可根据需要设置水印图片
//
// if r.Method="POST"{
// u.Do("files", r) // 执行上传操作
// }
// }
//
// func(w http.ResponseWriter, r *http.Request) {
// u, err := upload.New("~/uploads/", 1024*1024*10, ".txt", ".jpg", ".png")
// u.SetWatermarkFile(...) // 可根据需要设置水印图片
//
// if r.Method="POST"{
// u.Do("files", r) // 执行上传操作
// }
// }
package upload
2 changes: 2 additions & 0 deletions example/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2015-2024 caixw
//
// SPDX-License-Identifier: MIT

// 简单的 upload 包的示例程序,可以一次上传一个或是多个功能!
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/issue9/upload/v2

require (
github.com/issue9/assert/v3 v3.0.4
github.com/issue9/watermark v1.2.2
github.com/issue9/assert/v4 v4.1.1
github.com/issue9/watermark v1.2.3
)

go 1.17
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
github.com/issue9/assert/v3 v3.0.0/go.mod h1:yft/uaskRpwQTyBT3n1zRl91SR1wNlO4fLZHzOa4bdM=
github.com/issue9/assert/v3 v3.0.4 h1:WsYZQ6PQmM/pGFrbkn5GIXjWeVZHv+wcl2829UTX1Qc=
github.com/issue9/assert/v3 v3.0.4/go.mod h1:yft/uaskRpwQTyBT3n1zRl91SR1wNlO4fLZHzOa4bdM=
github.com/issue9/watermark v1.2.2 h1:NZKq4hgnvlJAkZBsN4ukD4/CM+PXV1auQejng1tfuZM=
github.com/issue9/watermark v1.2.2/go.mod h1:KMwBYtBwNnMWCNn+jLpOQTV5B8cT73FzzD/lsXKwyf0=
github.com/issue9/assert/v4 v4.1.1 h1:OhPE8SB8n/qZCNGLQa+6MQtr/B3oON0JAVj68k8jJlc=
github.com/issue9/assert/v4 v4.1.1/go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4=
github.com/issue9/watermark v1.2.3 h1:U+W3kvtElxrB++1FHqNlALEClnXIiJyheGARe5r7O3Q=
github.com/issue9/watermark v1.2.3/go.mod h1:QtlFopr7R0o+Tnc4Vzrn3AFhJX9jqsKbNr2HTsP3PWU=
2 changes: 2 additions & 0 deletions upload.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2015-2024 caixw
//
// SPDX-License-Identifier: MIT

package upload
Expand Down
4 changes: 3 additions & 1 deletion upload_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2015-2024 caixw
//
// SPDX-License-Identifier: MIT

package upload
Expand All @@ -13,7 +15,7 @@ import (
"testing"
"time"

"github.com/issue9/assert/v3"
"github.com/issue9/assert/v4"
)

var _ fs.FS = &Upload{}
Expand Down

0 comments on commit 8619268

Please sign in to comment.