github.com/vmware/govmomi@v0.51.0/vim25/progress/common_test.go (about)

     1  // © Broadcom. All Rights Reserved.
     2  // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package progress
     6  
     7  type dummySinker struct {
     8  	ch chan Report
     9  }
    10  
    11  func (d dummySinker) Sink() chan<- Report {
    12  	return d.ch
    13  }
    14  
    15  type dummyReport struct {
    16  	p float32
    17  	d string
    18  	e error
    19  }
    20  
    21  func (p dummyReport) Percentage() float32 {
    22  	return p.p
    23  }
    24  
    25  func (p dummyReport) Detail() string {
    26  	return p.d
    27  }
    28  
    29  func (p dummyReport) Error() error {
    30  	return p.e
    31  }