Skip to content

Commit

Permalink
Merge pull request #2 from k1LoW/use-filepath
Browse files Browse the repository at this point in the history
Use path/filepath
  • Loading branch information
k1LoW authored May 20, 2018
2 parents b845b13 + eae8249 commit d42e7f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions output/md/md.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func Output(s *schema.Schema, path string, force bool) error {
if err != nil {
return err
}
tmpl := template.Must(template.ParseFiles("output/md/index.md.tmpl"))
tmpl := template.Must(template.ParseFiles(filepath.Join("output", "md", "index.md.tmpl")))
err = tmpl.Execute(file, map[string]interface{}{
"Schema": s,
})
Expand All @@ -42,7 +42,7 @@ func Output(s *schema.Schema, path string, force bool) error {
if err != nil {
return err
}
tmpl := template.Must(template.ParseFiles("output/md/table.md.tmpl"))
tmpl := template.Must(template.ParseFiles(filepath.Join("output", "md", "table.md.tmpl")))
err = tmpl.Execute(file, map[string]interface{}{
"Table": t,
})
Expand Down Expand Up @@ -94,7 +94,7 @@ func Diff(s *schema.Schema, path string) error {
// tables
for _, t := range s.Tables {
a := new(bytes.Buffer)
tmpl := template.Must(template.ParseFiles("output/md/table.md.tmpl"))
tmpl := template.Must(template.ParseFiles(filepath.Join("output", "md", "table.md.tmpl")))
err = tmpl.Execute(a, map[string]interface{}{
"Table": t,
})
Expand Down

0 comments on commit d42e7f8

Please # to comment.