Activity indicator for init command (#207)

* first version of spinner

- implemented class with basic method
- covered with dummy test
- integrated with init command

* Style and license remarks

* fixed review remarks

* fixed typo + integration of spinner with terminate command

* integration of spinner with create command
This commit is contained in:
Valentyn Yukhymenko 2022-10-04 19:17:05 +03:00 committed by GitHub
parent acdcb535c0
commit abe40de3e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 175 additions and 4 deletions

View file

@ -114,7 +114,10 @@ func create(cmd *cobra.Command, creator cloudCreator, fileHandler file.Handler)
}
}
spinner := newSpinner(cmd, "Loading ", true)
spinner.Start()
state, err := creator.Create(cmd.Context(), provider, config, flags.name, instanceType, flags.controllerCount, flags.workerCount)
spinner.Stop()
if err != nil {
return err
}