func (this *Dispatcher) Dispatch(request *io.Request, response *io.Response) Interactor { _, hasHelpParam := request.GetUniversalParamString("h") if hasHelpParam { return this.locator.GetInteractorByName("help") } interator := this.locator.GetInteractorByName(request.InteractorName) if interator == nil { return this.locator.GetInteractorByName("help") } return interator }
func (this *OptionsApplier) Apply(request *io.Request, response *io.Response) { var ok bool _, ok = request.GetUniversalParamString("v") if ok { response.SetVerbose(true) } _, ok = request.GetUniversalParamString("n") if ok { response.SetVerbose(false) } }
func (this *Validator) isInteractorEmpty(request *io.Request) bool { _, hasHelpOption := request.GetUniversalParamString("h") return !hasHelpOption && request.InteractorNameEmpty() }