github.com/sleungcy/cli@v7.1.0+incompatible/command/translatableerror/process_instance_not_running_error.go (about) 1 package translatableerror 2 3 // ProcessInstanceNotRunningError is returned when trying to perform an action 4 // on an instance that is not running 5 type ProcessInstanceNotRunningError struct { 6 ProcessType string 7 InstanceIndex uint 8 } 9 10 func (ProcessInstanceNotRunningError) Error() string { 11 return "Instance {{.InstanceIndex}} of process {{.ProcessType}} not running" 12 } 13 14 func (e ProcessInstanceNotRunningError) Translate(translate func(string, ...interface{}) string) string { 15 return translate(e.Error(), map[string]interface{}{ 16 "ProcessType": e.ProcessType, 17 "InstanceIndex": e.InstanceIndex, 18 }) 19 }