github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/command/translatableerror/startup_timeout_error.go (about)

     1  package translatableerror
     2  
     3  type StartupTimeoutError struct {
     4  	AppName    string
     5  	BinaryName string
     6  }
     7  
     8  func (StartupTimeoutError) Error() string {
     9  	return "Start app timeout\n\nTIP: Application must be listening on the right port. Instead of hard coding the port, use the $PORT environment variable.\n\nUse '{{.BinaryName}} logs {{.AppName}} --recent' for more information"
    10  }
    11  
    12  func (e StartupTimeoutError) Translate(translate func(string, ...interface{}) string) string {
    13  	return translate(e.Error(), map[string]interface{}{
    14  		"AppName":    e.AppName,
    15  		"BinaryName": e.BinaryName,
    16  	})
    17  }