20
0

add panic

This commit is contained in:
joeekee 2018-04-16 16:50:54 +08:00 committed by GitHub
parent d1d6f84447
commit 643b32559d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
xls.go
View File

@ -3,7 +3,7 @@ package xls
import ( import (
"io" "io"
"os" "os"
"log"
"github.com/extrame/ole2" "github.com/extrame/ole2"
) )
@ -51,6 +51,8 @@ func OpenReader(reader io.ReadSeeker, charset string) (wb *WorkBook, err error)
if book != nil { if book != nil {
wb = newWorkBookFromOle2(ole.OpenFile(book, root)) wb = newWorkBookFromOle2(ole.OpenFile(book, root))
return return
} else {
log.Panic("book == nil")
} }
} }
} }