New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add document guesser foundations #27
Conversation
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
o wait, adding some simple tests |
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
technically, a bit of an edge case where if a document is too small, it may match multiple formats, but don't think that would be an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor question
return processor.FormatJSON | ||
} | ||
return processor.FormatUnknown | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should call the RegisterDocumentFormatGuesser
function here in init
, so it always gets registered when this module is imported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package guesser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minior nit: Do we want to break out the the implementation into a separate package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was doing that, then i felt like i was writing java in the 90s, then i reverted it back lol... maybe a follow up PR
* Fix RH CSAF Parser Signed-off-by: mrizzi <mrizzi@redhat.com> * CSAF Parser: fix double ingestion Signed-off-by: mrizzi <mrizzi@redhat.com> --------- Signed-off-by: mrizzi <mrizzi@redhat.com>
Part of #26
Signed-off-by: Brandon Lum lumjjb@gmail.com