Conversation
| err := errors.New("no data source defined for task") | ||
| if raw { | ||
| results = append(results, &types.Result{Description: task.RawPath}) | ||
| results = append(results, &types.Result{Path: task.RawPath}) |
There was a problem hiding this comment.
Defining path will cause these to appear in index.json, but there won't be any files at the path.
| results := []*types.Result{} | ||
|
|
||
| descriptionResults := []*types.Result{} | ||
| pathResults := []*types.Result{} |
There was a problem hiding this comment.
Why do we need results and pathResults? If the spec asked for a file then there should be a result for it. If there's an error the result will be added to error.json and if there's a path it will be added to index.json.
There was a problem hiding this comment.
It would be nice to be able to tell what path the error refers to. can you think of a better way to do this?
There was a problem hiding this comment.
It might make sense to put all the specs in index.json and add results and errors as fields to that spec so that it's clear which files and errors came from each spec.
|
|
||
| type BytesScrubber func([]byte) []byte | ||
|
|
||
| func BytesProducerFromStreamProducer(ss StreamProducer) BytesProducer { |
There was a problem hiding this comment.
Why not use plans.StreamSource when you have a stream producer?
There was a problem hiding this comment.
because plans.StreamSource doesnt have a parser
areed
left a comment
There was a problem hiding this comment.
It looks cleaner but I left a couple questions
No description provided.