github.com/cloudfoundry-incubator/stembuild@v0.0.0-20211223202937-5b61d62226c6/commandparser/construct_messenger.go (about)

     1  package commandparser
     2  
     3  import (
     4  	"fmt"
     5  	"io"
     6  )
     7  
     8  type ConstructCmdMessenger struct {
     9  	OutputChannel io.Writer
    10  }
    11  
    12  func (m *ConstructCmdMessenger) printMessage(message string) {
    13  	fmt.Fprintln(m.OutputChannel, message)
    14  }
    15  
    16  func (m *ConstructCmdMessenger) ArgumentsNotProvided() {
    17  	m.printMessage("Not all required parameters were provided. See stembuild --help for more details")
    18  }
    19  
    20  func (m *ConstructCmdMessenger) LGPONotFound() {
    21  	m.printMessage("Could not find LGPO.zip in the current directory")
    22  }
    23  
    24  func (m *ConstructCmdMessenger) CannotConnectToVM(err error) {
    25  	m.printMessage(fmt.Sprintf("Cannot connect to VM: %s", err))
    26  }
    27  
    28  func (m *ConstructCmdMessenger) CannotPrepareVM(err error) {
    29  	m.printMessage(fmt.Sprintf("Could not prepare VM: %s", err))
    30  }