MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / concatCobraCmdFuncs

Function concatCobraCmdFuncs

libs/cli/setup.go:114–125  ·  view source on GitHub ↗

Returns a single function that calls each argument function in sequence RunE, PreRunE, PersistentPreRunE, etc. all have this same signature

(fs ...cobraCmdFunc)

Source from the content-addressed store, hash-verified

112// Returns a single function that calls each argument function in sequence
113// RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
114func concatCobraCmdFuncs(fs ...cobraCmdFunc) cobraCmdFunc {
115 return func(cmd *cobra.Command, args []string) error {
116 for _, f := range fs {
117 if f != nil {
118 if err := f(cmd, args); err != nil {
119 return err
120 }
121 }
122 }
123 return nil
124 }
125}
126
127// Bind all flags and read the config into viper
128func bindFlagsLoadViper(cmd *cobra.Command, args []string) error {

Callers 2

PrepareBaseCmdFunction · 0.85
PrepareMainCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected