Skip to content

Commit

Permalink
chore: 更新依赖项
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Mar 13, 2024
1 parent d296728 commit 6170f0a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ jobs:
test:
name: Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
go: ['1.22.x', '1.18.x']

steps:

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

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go

- name: Vet
run: go vet -v ./...

- name: Test
run: go test -v -coverprofile='coverage.txt' -covermode=atomic ./...

- name: Upload Coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
8 changes: 4 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Config struct {
s Serializer
}

// BuildDir 根据 dir 生成不同的 Config
// BuildDir 根据 dir 生成不同的 [Config]
//
// dir 为项目的配置文件目录,后续通过 [Config] 操作的文件都是基于此目录的。可以带以下的特殊前缀:
// - ~ 表示系统提供的配置文件目录,比如 Linux 的 XDG_CONFIG、Window 的 AppData 等;
Expand Down Expand Up @@ -81,10 +81,10 @@ func Dir(s Serializer, dir string) *Config {
return c
}

// New 声明 Config 对象
// New 声明 [Config] 对象
//
// dir 表示当前项目的配置文件存放的目录名称;
// parent 表示获取系统中用于存放配置文件的目录,比如 Linux 中的 XDG_CONFIG 等目录。
// dir 表示当前项目的配置文件存放的目录名称,如果 parent 不为空,为相对于 parent 返回值的路径
// parent 表示获取系统中用于存放配置文件的路径,比如 Linux 中的 XDG_CONFIG 等目录。
// 用户可以根据自己的需求自行实现该方法,如果为 nil,表示直接将 dir 作为全路径进行处理。
func New(s Serializer, dir string, parent func() (string, error)) (*Config, error) {
if parent != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.18

require (
github.com/issue9/assert/v4 v4.1.1
github.com/issue9/localeutil v0.26.4
github.com/issue9/localeutil v0.26.5
golang.org/x/text v0.14.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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/localeutil v0.26.4 h1:rfBC3YAt9PLHXHc5unreZpYjlEt+xCnVOUr7QDAveiw=
github.com/issue9/localeutil v0.26.4/go.mod h1:BJXJwcAT9CyyVZOlqfmq+B5FcPbqGxGjYnTYbVuiMM8=
github.com/issue9/localeutil v0.26.5 h1:e78b6cOOtgzfb4g4U9uPLC8QyK6Lux+s7ZiQe+6iM1A=
github.com/issue9/localeutil v0.26.5/go.mod h1:BJXJwcAT9CyyVZOlqfmq+B5FcPbqGxGjYnTYbVuiMM8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=

0 comments on commit 6170f0a

Please sign in to comment.