(context *CommandExecContext, parameters []parser.Parameter)
| 39 | } |
| 40 | |
| 41 | func (b CommandBuilder) fileInput(context *CommandExecContext, parameters []parser.Parameter) stream.Stream { |
| 42 | value := context.String(FlagNameFile) |
| 43 | if value == "" { |
| 44 | return nil |
| 45 | } |
| 46 | if value == FlagValueFromStdIn { |
| 47 | return b.Input |
| 48 | } |
| 49 | for _, param := range parameters { |
| 50 | if strings.EqualFold(param.FieldName, FlagNameFile) { |
| 51 | return nil |
| 52 | } |
| 53 | } |
| 54 | return stream.NewFileStream(value) |
| 55 | } |
| 56 | |
| 57 | func (b CommandBuilder) createExecutionParameter(context *CommandExecContext, config *config.Config, param parser.Parameter) (*executor.ExecutionParameter, error) { |
| 58 | typeConverter := newTypeConverter() |
no test coverage detected