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 809f756 commit b1b9d63
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 12 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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 issue9
Copyright (c) 2019 caixw

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// SPDX-FileCopyrightText: 2019-2024 caixw
//
// SPDX-License-Identifier: MIT

package qheader

import (
"testing"

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

func BenchmarkParseItem(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/issue9/qheader

require github.com/issue9/assert/v3 v3.0.4
require github.com/issue9/assert/v4 v4.1.1

go 1.17
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
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/assert/v4 v4.1.1 h1:OhPE8SB8n/qZCNGLQa+6MQtr/B3oON0JAVj68k8jJlc=
github.com/issue9/assert/v4 v4.1.1/go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4=
2 changes: 2 additions & 0 deletions item.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2019-2024 caixw
//
// SPDX-License-Identifier: MIT

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

package qheader
Expand All @@ -6,7 +8,7 @@ import (
"errors"
"testing"

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

func TestParseItem(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion qheader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2019-2024 caixw
//
// SPDX-License-Identifier: MIT

// Package qheader 用于处理 quality factor 报头
Expand Down Expand Up @@ -70,7 +72,6 @@ func AcceptEncoding(r *http.Request) *QHeader {

// Parse 解析报头内容
//
//
// 排序方式如下:
//
// Q 值大的靠前,如果 Q 值相同,则全名的比带通配符的靠前,*/* 最后,都是全名则按原来顺序返回。
Expand Down
4 changes: 3 additions & 1 deletion qheader_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-FileCopyrightText: 2019-2024 caixw
//
// SPDX-License-Identifier: MIT

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

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

func TestAccept(t *testing.T) {
Expand Down

0 comments on commit b1b9d63

Please sign in to comment.