Use working directory

This commit is contained in:
Glenn Y. Rolland 2018-12-27 14:14:31 +01:00
parent 0ff79c1aab
commit 15b2e6e23f

View file

@ -8,7 +8,9 @@ import (
"github.com/russross/blackfriday/v2" "github.com/russross/blackfriday/v2"
"log" "log"
"net/url" "net/url"
"os"
"os/exec" "os/exec"
"path"
"strings" "strings"
"text/template" "text/template"
) )
@ -185,7 +187,8 @@ func (board *TrelloBoard) ExportToMarkdown() string {
data := board.ExportData() data := board.ExportData()
t, err := template.ParseFiles("templates/markdown.tmpl") wd, err := os.Getwd()
t, err := template.ParseFiles(path.Join(wd, "templates/markdown.tmpl"))
if err != nil { if err != nil {
log.Panic("Unable to parse template files") log.Panic("Unable to parse template files")
} }