Ai
1 Star 0 Fork 0

GoAdmin/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 476 Bytes
Copy Edit Raw Blame History
GoAdmin authored 2022-06-08 16:39 +08:00 . test
package flag
import (
"context"
"github.com/go-admin-team/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/GoAdminCore/admin-core.git
git@gitee.com:GoAdminCore/admin-core.git
GoAdminCore
admin-core
admin-core
v1.0.0

Search