1 Star 0 Fork 29

wangyfbe/go-admin-core

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
options.go 470 Bytes
Copy Edit Raw Blame History
brandwwang authored 2023-06-03 18:01 +08:00 . change go mod
package flag
import (
"context"
"gitee.com/wangyfbe/go-admin-core/config/source"
)
type includeUnsetKey struct{}
// IncludeUnset toggles the loading of unset flags and their respective default values.
// Default behavior is to ignore any unset flags.
func IncludeUnset(b bool) source.Option {
return func(o *source.Options) {
if o.Context == nil {
o.Context = context.Background()
}
o.Context = context.WithValue(o.Context, includeUnsetKey{}, true)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wangyfbe/go-admin-core.git
git@gitee.com:wangyfbe/go-admin-core.git
wangyfbe
go-admin-core
go-admin-core
v1.10.3

Search