Skip to content

Commit

Permalink
docs: 添加文档说明
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Apr 18, 2024
1 parent 6170f0a commit 54269ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ type FieldError struct {

// Sanitizer 对配置文件的数据验证和修正
type Sanitizer interface {
// SanitizeConfig 验证当前对象的数据
//
// NOTE: 如果当前对象是个结构体,
// 需要接口的实现自行判断和调用各个字段 [Sanitizer] 接口。
SanitizeConfig() *FieldError
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/issue9/config
go 1.18

require (
github.com/issue9/assert/v4 v4.1.1
github.com/issue9/assert/v4 v4.2.0
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,5 +1,5 @@
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/assert/v4 v4.2.0 h1:XJGMFYW0xfESqFRPLWbSsr0xWdkofytvQbDfNb5n9fw=
github.com/issue9/assert/v4 v4.2.0/go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4=
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=
Expand Down

0 comments on commit 54269ed

Please sign in to comment.