func isUnaryFuncForm(ftype reflect.Type) (unaryFuncForm, error) {
	if ftype.NumOut() != 1 {
		return unaryFuncUnsupported, fmt.Errorf("unary func must return one param")
	}

	switch ftype.Kind() {
	case reflect.Func:
		switch ftype.NumIn() {
		case 1:
			// f(in)out, ok
			return unaryFuncForm1, nil
		case 2:
			// func(context,in)out
			param0 := ftype.In(0)
			if param0.Kind() != reflect.Interface {
				return unaryFuncUnsupported, fmt.Errorf("unary must be type func(T)R or func(context.Context, T)R")
			}
			return unaryFuncForm2, nil
		}
	}
	return unaryFuncUnsupported, fmt.Errorf("unary func must be of type func(T)R or func(context.Context,T)R")
}
// isUnaryFuncForm ensures ftype is of supported function of
// form func(in) out or func(context, in) out
isUnaryFuncForm ensures ftype is of supported function of
form func(in) out or func(context, in) out
// isUnaryFuncForm ensures ftype is of supported function of // form func ( in ) out or func ( context in ) out
func isUnaryFuncForm(ftype reflect.Type) (unaryFuncForm, error) {
	if ftype.NumOut() != 1 {
		return unaryFuncUnsupported, fmt.Errorf("unary func must return one param")
	}
	switch ftype.Kind() {
	case reflect.Func:
		switch ftype.NumIn() {
		case 1:
			return unaryFuncForm1, nil
		case 2:
			param0 := ftype.In(0)
			if param0.Kind() != reflect.Interface {
				return unaryFuncUnsupported, fmt.Errorf("unary must be type func(T)R or func(context.Context, T)R")
			}
			return unaryFuncForm2, nil
		}
	}
	return unaryFuncUnsupported, fmt.Errorf("unary func must be of type func(T)R or func(context.Context,T)R")
}
func isUnaryFuncForm ( ftype reflect . Type ) ( unaryFuncForm , error ) { if ftype . NumOut ( ) != 1 { return unaryFuncUnsupported , fmt . Errorf ( " " ) } switch ftype . Kind ( ) { case reflect . Func : switch ftype . NumIn ( ) { case 1 : return unaryFuncForm1 , nil case 2 : param0 := ftype . In ( 0 ) if param0 . Kind ( ) != reflect . Interface { return unaryFuncUnsupported , fmt . Errorf ( " " ) } return unaryFuncForm2 , nil } } return unaryFuncUnsupported , fmt . Errorf ( " " ) }
isUnaryFuncForm ensures ftype is of supported function of
form func(in) out or func(context, in) out
isUnaryFuncForm ensures ftype is of supported function of form func ( in ) out or func ( context in ) out
// f(in)out, ok // func(context,in)out