mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 10:22:05 +02:00
Use cobra (#234)
switch to cobra Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package config
|
||||
|
||||
// FetchOptions is the options for the build command
|
||||
type FetchOptions struct {
|
||||
// Concurrency is the maximum number of concurrent helm processes to run, 0 is unlimited
|
||||
Concurrency int
|
||||
// SkipDeps is the skip deps flag
|
||||
SkipDeps bool
|
||||
// OutputDir is the output directory
|
||||
OutputDir string
|
||||
}
|
||||
|
||||
// NewFetchOptions creates a new Apply
|
||||
func NewFetchOptions() *FetchOptions {
|
||||
return &FetchOptions{}
|
||||
}
|
||||
|
||||
// FetchImpl is impl for applyOptions
|
||||
type FetchImpl struct {
|
||||
*GlobalImpl
|
||||
*FetchOptions
|
||||
}
|
||||
|
||||
// NewFetchImpl creates a new FetchImpl
|
||||
func NewFetchImpl(g *GlobalImpl, b *FetchOptions) *FetchImpl {
|
||||
return &FetchImpl{
|
||||
GlobalImpl: g,
|
||||
FetchOptions: b,
|
||||
}
|
||||
}
|
||||
|
||||
// Concurrency returns the concurrency
|
||||
func (c *FetchImpl) Concurrency() int {
|
||||
return c.FetchOptions.Concurrency
|
||||
}
|
||||
|
||||
// SkipDeps returns the skip deps
|
||||
func (c *FetchImpl) SkipDeps() bool {
|
||||
return c.FetchOptions.SkipDeps
|
||||
}
|
||||
|
||||
// Args returns the args
|
||||
func (c *FetchImpl) Args() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// OutputDir returns the args
|
||||
func (c *FetchImpl) OutputDir() string {
|
||||
return c.FetchOptions.OutputDir
|
||||
}
|
||||
Reference in New Issue
Block a user