1 Star 0 Fork 0

bolo-tourism/go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
options.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
kevin 提交于 2023-05-08 14:34 +08:00 . 初始化
// Copyright 2020 Lingfei Kong <colin404@foxmail.com>. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package app
import cliflag "gitee.com/bolo-tourism/go/pkg/cli/flag"
// CliOptions abstracts configuration options for reading parameters from the
// command line.
type CliOptions interface {
// AddFlags adds flags to the specified FlagSet object.
// AddFlags(fs *pflag.FlagSet)
Flags() (fss cliflag.NamedFlagSets)
Validate() []error
}
// ConfigurableOptions abstracts configuration options for reading parameters
// from a configuration file.
type ConfigurableOptions interface {
// ApplyFlags parsing parameters from the command line or configuration file
// to the options instance.
ApplyFlags() []error
}
// CompleteableOptions abstracts options which can be completed.
type CompleteableOptions interface {
Complete() error
}
// PrintableOptions abstracts options which can be printed.
type PrintableOptions interface {
String() string
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/bolo-tourism/go.git
git@gitee.com:bolo-tourism/go.git
bolo-tourism
go
go
772bc38bfa1d

搜索帮助