some improvements
This commit is contained in:
parent
3c5be25cb3
commit
58a0dc36d5
25 changed files with 233 additions and 105 deletions
|
|
@ -106,6 +106,10 @@ func (s *Scanner) Scan(file string) (filename, text string, err error) {
|
|||
var pdffile string
|
||||
pdf := isPDF(scanfile)
|
||||
if !pdf {
|
||||
if !isImage(scanfile) {
|
||||
err = errors.New("error: input file is not an image")
|
||||
return
|
||||
}
|
||||
var (
|
||||
pdf []byte
|
||||
f *os.File
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue