Unable to parse .doc file
searcherone opened this issue · comments
searcherone commented
When I read the .doc file from the local directory, I get a goruntime error
Below is my code
`package main
import (
"code.sajari.com/docconv"
"fmt"
"log"
"os"
)
func main() {
f, err := os.Open("C:\\Users\\94417\\Desktop\\go\\20210913test.doc")
if err != nil {
log.Fatalf("got error = %v, want nil", err)
}
//println(f)
res, _, err := docconv.ConvertDoc(f)
if err != nil {
log.Fatal(err)
}
fmt.Println(res)
f.Close()
Hamish commented
You're causing a runtime exit for any error response using log.Fatal
. You don't include the actual error in this issue, so it's impossible for us to know why your file is failing. Feel free to reopen if you can provide more info or add a failing test so we can help.