Merge "Fix Lint warnings: Missing comments for functions"
This commit is contained in:
commit
c33e0a20ad
@ -27,10 +27,12 @@ type ApplyOptions struct {
|
||||
ApplyOptions *apply.ApplyOptions
|
||||
}
|
||||
|
||||
// SetDryRun enables/disables the dry run flag in kubectl apply options
|
||||
func (ao *ApplyOptions) SetDryRun(dryRun bool) {
|
||||
ao.ApplyOptions.DryRun = dryRun
|
||||
}
|
||||
|
||||
// SetPrune enables/disables the prune flag in kubectl apply options
|
||||
func (ao *ApplyOptions) SetPrune(label string) {
|
||||
if label != "" {
|
||||
ao.ApplyOptions.Prune = true
|
||||
@ -45,6 +47,7 @@ func (ao *ApplyOptions) SetSourceFiles(fileNames []string) {
|
||||
ao.ApplyOptions.DeleteOptions.Filenames = fileNames
|
||||
}
|
||||
|
||||
// Run executes the `apply` command.
|
||||
func (ao *ApplyOptions) Run() error {
|
||||
return ao.ApplyOptions.Run()
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ func NewKubectl(f cmdutil.Factory) *Kubectl {
|
||||
}
|
||||
}
|
||||
|
||||
// WithBufferDir sets buffer dir
|
||||
func (kubectl *Kubectl) WithBufferDir(bd string) *Kubectl {
|
||||
kubectl.bufferDir = bd
|
||||
return kubectl
|
||||
|
@ -19,6 +19,8 @@ import (
|
||||
cmdutil "k8s.io/kubectl/pkg/cmd/util"
|
||||
)
|
||||
|
||||
// FactoryFromKubeConfigPath returns a factory with the
|
||||
// default Kubernetes resources for the given kube config path
|
||||
func FactoryFromKubeConfigPath(kp string) cmdutil.Factory {
|
||||
kf := genericclioptions.NewConfigFlags(false)
|
||||
kf.KubeConfig = &kp
|
||||
|
@ -20,10 +20,15 @@ import (
|
||||
aerror "opendev.org/airship/airshipctl/pkg/errors"
|
||||
)
|
||||
|
||||
// TODO: This need to be refactored to match the error format used elsewhere in airshipctl
|
||||
// Usage of this error should be deprecated as it doesn't provide meaningful feedback to the user.
|
||||
|
||||
// GenericError provides general feedback about an error that occurred in a remote operation
|
||||
type GenericError struct {
|
||||
aerror.AirshipError
|
||||
}
|
||||
|
||||
// NewRemoteDirectErrorf retruns formatted remote direct errors
|
||||
func NewRemoteDirectErrorf(format string, v ...interface{}) error {
|
||||
e := &GenericError{}
|
||||
e.Message = fmt.Sprintf(format, v...)
|
||||
|
@ -26,6 +26,8 @@ import (
|
||||
"opendev.org/airship/airshipctl/pkg/log"
|
||||
)
|
||||
|
||||
// URLSchemeSeparator holds the separator for URL scheme
|
||||
// Example: git+ssh
|
||||
const (
|
||||
redfishURLSchemeSeparator = "+"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user