Capture context from cobra CLI and pass forward (#2551)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-09-22 13:54:05 +05:30
committed by GitHub
parent d03395949b
commit e87c84ee2c
33 changed files with 93 additions and 83 deletions
@@ -17,6 +17,7 @@ limitations under the License.
package resources
import (
"context"
"fmt"
"path/filepath"
@@ -32,7 +33,7 @@ func NewFissionVersion(client client.Interface) Resource {
return FissionVersion{client: client}
}
func (res FissionVersion) Dump(dumpDir string) {
func (res FissionVersion) Dump(ctx context.Context, dumpDir string) {
ver := util.GetVersion(res.client)
file := filepath.Clean(fmt.Sprintf("%v/%v", dumpDir, "fission-version.txt"))
writeToFile(file, ver)