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 daaf68a commit b0e452d
Show file tree
Hide file tree
Showing 92 changed files with 235 additions and 62 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.22.x
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
go: ['1.21.x', '1.18.x']
go: ['1.22.x', '1.18.x']

steps:

Expand Down
2 changes: 2 additions & 0 deletions blogit.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

//go:generate web locale -l=und -m -f=yaml ./
Expand Down
4 changes: 3 additions & 1 deletion blogit_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package blogit

import (
"testing"

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

"github.com/caixw/blogit/v2/internal/filesystem"
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

# SPDX-FileCopyrightText: 2020-2024 caixw
# SPDX-License-Identifier: MIT

cd $(dirname $0) || exit
Expand Down
2 changes: 2 additions & 0 deletions builder/archive.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/atom.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/builder.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package builder 提供编译成 HTML 的相关功能
Expand Down
6 changes: 4 additions & 2 deletions builder/builder_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand All @@ -7,8 +9,8 @@ import (
"net/http"
"testing"

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

"github.com/caixw/blogit/v2/internal/testdata"
"github.com/caixw/blogit/v2/internal/vars"
Expand Down
2 changes: 2 additions & 0 deletions builder/fs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package builder
Expand All @@ -10,7 +12,7 @@ import (
"path"
"testing"

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

"github.com/caixw/blogit/v2/internal/filesystem"
)
Expand Down
2 changes: 2 additions & 0 deletions builder/post.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/profile.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/robots.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/rss.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/site.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/sitemap.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/tag.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
2 changes: 2 additions & 0 deletions builder/template.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder
Expand Down
4 changes: 3 additions & 1 deletion builder/template_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package builder

import (
"testing"

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

func TestStripTags(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions cmd/blogit/blogit.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

// 静态博客网站生成工具
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ go 1.18
require (
github.com/alecthomas/chroma/v2 v2.12.0
github.com/fsnotify/fsnotify v1.7.0
github.com/issue9/assert/v3 v3.1.0
github.com/issue9/cmdopt v0.13.0
github.com/issue9/errwrap v0.3.1
github.com/issue9/localeutil v0.26.1
github.com/issue9/sliceutil v0.15.0
github.com/issue9/term/v3 v3.2.5
github.com/issue9/version v1.0.7
github.com/issue9/assert/v4 v4.1.1
github.com/issue9/cmdopt v0.13.1
github.com/issue9/errwrap v0.3.2
github.com/issue9/localeutil v0.26.4
github.com/issue9/sliceutil v0.15.1
github.com/issue9/term/v3 v3.2.6
github.com/issue9/version v1.0.8
github.com/mdigger/goldmark-toc v0.0.0-20191225162753-7bc0e0d778c3
github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e
github.com/yuin/goldmark v1.6.0
github.com/yuin/goldmark v1.7.0
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
github.com/yuin/goldmark-meta v1.1.0
golang.org/x/text v0.14.0
Expand All @@ -25,6 +25,6 @@ require (
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/gosimple/slug v1.9.0 // indirect
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.17.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
36 changes: 18 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/gosimple/slug v1.9.0 h1:r5vDcYrFz9BmfIAMC829un9hq7hKM4cHUrsv36LbEqs=
github.com/gosimple/slug v1.9.0/go.mod h1:AMZ+sOVe65uByN3kgEyf9WEBKBCSS+dJjMX9x4vDJbg=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/issue9/assert/v3 v3.1.0 h1:oxLFXS7QnBKI4lB31pRoYO96yErkWAJtR7iv+LNjAPg=
github.com/issue9/assert/v3 v3.1.0/go.mod h1:yft/uaskRpwQTyBT3n1zRl91SR1wNlO4fLZHzOa4bdM=
github.com/issue9/cmdopt v0.13.0 h1:mLaa7R94a6MbCf+1GIt4YgFDW6fdt/nnL0AjgKgf8jQ=
github.com/issue9/cmdopt v0.13.0/go.mod h1:l//IcugcBwX+vCc2KrgC4ylU6rEzhjQyxno7hWoLCDE=
github.com/issue9/errwrap v0.3.1 h1:8g4lYJaGnoiXyZ1oZyH/7zPDGgw5RNiE9Q6ri9kE6Z8=
github.com/issue9/errwrap v0.3.1/go.mod h1:HLR0e5iimd2aJXM9YrThOsRj3/6lMtk77lVp7zyvJ4E=
github.com/issue9/localeutil v0.26.1 h1:4T4508SlTKcKkNjaj6Fer+ZyMVOU+UBUu4DWk/Zq8+I=
github.com/issue9/localeutil v0.26.1/go.mod h1:JU83qFEhBswkZdLc3bWS719ku5QY1/mqU8vhsP9Znsw=
github.com/issue9/sliceutil v0.15.0 h1:E6Xnl3FY5h0ZGNzyx1VEFAfGdParaq/BkX1QQR0uFwI=
github.com/issue9/sliceutil v0.15.0/go.mod h1:n9meV7AamDhmehOBuV4GrxW3yw7O1cZmLx3Xizg1bps=
github.com/issue9/term/v3 v3.2.5 h1:kAC5ynwTiqe/63E3JAV2Cb7eVxVno+L7VsmYgJyyLw0=
github.com/issue9/term/v3 v3.2.5/go.mod h1:Qm0PvOTggMvZUEsAmpiBr/uBaq5Qh/w4LQJcvznfAjc=
github.com/issue9/version v1.0.7 h1:uKcWyuEWbcFdPeqmR2ivuy4/CsB0la0xkk3gxlMjxZs=
github.com/issue9/version v1.0.7/go.mod h1:YTMKrK5SRLf0xgXfCPy0T/vpjTP52gjor67fsEVcnMU=
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/cmdopt v0.13.1 h1:VA/Hgd92NBbZyHjZx1xcRCMhoc+XjI1LWhiuZkOZ0VU=
github.com/issue9/cmdopt v0.13.1/go.mod h1:7lnF45Ush0boi4/nDjeSDYV5lZfoOzp3jm+biJr0f4g=
github.com/issue9/errwrap v0.3.2 h1:7KEme9Pfe75M+sIMcPCn/DV90wjnOcRbO4DXVAHj3Fw=
github.com/issue9/errwrap v0.3.2/go.mod h1:KcCLuUGiffjooLCUjL89r1cyO8/HT/VRcQrneO53N3A=
github.com/issue9/localeutil v0.26.4 h1:rfBC3YAt9PLHXHc5unreZpYjlEt+xCnVOUr7QDAveiw=
github.com/issue9/localeutil v0.26.4/go.mod h1:BJXJwcAT9CyyVZOlqfmq+B5FcPbqGxGjYnTYbVuiMM8=
github.com/issue9/sliceutil v0.15.1 h1:mV1VlQSO5E8sh2ab6pypLg7TdgGZlDb30E8quli01xY=
github.com/issue9/sliceutil v0.15.1/go.mod h1:ldun6sT4/bOJxuMtOXhtc6P7GCwE7L+avV86HNks7qk=
github.com/issue9/term/v3 v3.2.6 h1:+8sdVdT2GM3OoebNMd5wdt0bswJ1TBukK6HloKgoW3o=
github.com/issue9/term/v3 v3.2.6/go.mod h1:OCUgzwgKUbcHrlRyxQATPaYfNtNbWs17yzkogMpPIjA=
github.com/issue9/version v1.0.8 h1:IsNdDYdV8UGDGwwgp8H4RszJE0Ko26HjWg9pZzyOivs=
github.com/issue9/version v1.0.8/go.mod h1:w8bQwODBOG5+iaS3qIJbElxxpp3Uo4x5F39qKBqwpdc=
github.com/mdigger/goldmark-toc v0.0.0-20191225162753-7bc0e0d778c3 h1:V8Lm1RZWBBCemfs8u4aCkfrovo6TQWxCdIPbNFzZmZs=
github.com/mdigger/goldmark-toc v0.0.0-20191225162753-7bc0e0d778c3/go.mod h1:8N/DY/esIgHhhFgb7Hqu6IImzuGUmc3rc2vJlkg7MVw=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -42,14 +42,14 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.1.18/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68=
github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ=
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I=
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/build.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package cmd
Expand All @@ -6,7 +8,7 @@ import (
"os"
"testing"

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

"github.com/caixw/blogit/v2/internal/filesystem"
"github.com/caixw/blogit/v2/internal/vars"
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package cmd 提供命令行相关的功能
Expand Down
4 changes: 3 additions & 1 deletion internal/cmd/cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package cmd
Expand All @@ -6,7 +8,7 @@ import (
"bytes"
"flag"

"github.com/issue9/assert/v3"
"github.com/issue9/assert/v4"
"github.com/issue9/cmdopt"
"github.com/issue9/localeutil"
"golang.org/x/text/language"
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/console/console.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package console 输出到控制台的日志
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/console/locale.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package console
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/console/visiter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

package console
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/create/create.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package create 创建文章的相关子命令
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/create/init.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package create
Expand All @@ -8,7 +10,7 @@ import (
"path"
"testing"

"github.com/issue9/assert/v3"
"github.com/issue9/assert/v4"
"github.com/issue9/cmdopt"
"github.com/issue9/term/v3/colors"
"golang.org/x/text/language"
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/create/post.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package create
Expand All @@ -8,7 +10,7 @@ import (
"path"
"testing"

"github.com/issue9/assert/v3"
"github.com/issue9/assert/v4"
"github.com/issue9/cmdopt"
"github.com/issue9/term/v3/colors"
"golang.org/x/text/language"
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/drafts.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2020-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package cmd
Expand All @@ -6,7 +8,7 @@ import (
"strings"
"testing"

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

"github.com/caixw/blogit/v2/internal/vars"
)
Expand Down
Loading

0 comments on commit b0e452d

Please sign in to comment.