@@ -48,7 +48,6 @@ const (
4848
4949 minDiskSizeFlag = "min-disk-size"
5050 minRamFlag = "min-ram"
51- ownerFlag = "owner"
5251 protectedFlag = "protected"
5352)
5453
@@ -90,12 +89,12 @@ func NewCmd(p *print.Printer) *cobra.Command {
9089 Args : args .NoArgs ,
9190 Example : examples .Build (
9291 examples .NewExample (
93- `Create a named image 'my-new-image' from a raw disk image located in '/my/raw/image'` ,
92+ `Create an image with name 'my-new-image' from a raw disk image located in '/my/raw/image'` ,
9493 `$ stackit beta image create --name my-new-image --disk-format=raw --local-file-path=/my/raw/image` ,
9594 ),
9695 examples .NewExample (
97- `Create a named image 'my-new-image' from a qcow2 image read from '/my/qcow2/image' with labels describing its contents` ,
98- `$ stackit beta image create --name my-new-image --disk-format=qcow2 --local-file-path=/my/qcow2/image--labels os=linux,distro=alpine,version=3.12` ,
96+ `Create an image with name 'my-new-image' from a qcow2 image read from '/my/qcow2/image' with labels describing its contents` ,
97+ `$ stackit beta image create --name my-new-image --disk-format=qcow2 --local-file-path=/my/qcow2/image --labels os=linux,distro=alpine,version=3.12` ,
9998 ),
10099 ),
101100 RunE : func (cmd * cobra.Command , _ []string ) (err error ) {
@@ -173,12 +172,12 @@ func uploadAsync(ctx context.Context, p *print.Printer, model *inputModel, file
173172 go func () {
174173 ticker := time .NewTicker (2 * time .Second )
175174 var uploaded int
176- done:
175+ done:
177176 for {
178177 select {
179178 case <- ticker .C :
180- p .Info ("uploaded %3.1f%%\n " , 100.0 / float64 (stat .Size ())* float64 (uploaded ))
181- case n ,ok := <- ch :
179+ p .Info ("uploaded %3.1f%%\r " , 100.0 / float64 (stat .Size ())* float64 (uploaded ))
180+ case n , ok := <- ch :
182181 if ! ok {
183182 break done
184183 }
@@ -204,7 +203,7 @@ type progressReader struct {
204203 ch chan int
205204}
206205
207- func newProgressReader (delegate io.Reader ) (io.Reader , <- chan int ) {
206+ func newProgressReader (delegate io.Reader ) (reader io.Reader , result <- chan int ) {
208207 ch := make (chan int )
209208 return & progressReader {
210209 delegate : delegate ,
0 commit comments