1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 11:04:54 +08:00

Dump file

This commit is contained in:
Gonzalo Fernandez-Victorio
2021-05-11 12:51:13 +01:00
parent 54bd3d2d4a
commit b219de947c
2 changed files with 9 additions and 5 deletions

View File

@@ -9,12 +9,16 @@ import (
"github.com/gonfva/docxlib"
)
const FILE_PATH = "/tmp/new-file.docx"
var fileLocation *string
func init() {
fileLocation = flag.String("file", "/tmp/new-file.docx", "file location")
flag.Parse()
}
func main() {
flag.Parse()
//Now let's try to read the file
readFile, err := os.Open(FILE_PATH)
readFile, err := os.Open(*fileLocation)
if err != nil {
panic(err)
}