chore: Better example & gofmt
This commit is contained in:
parent
8fb24f9f75
commit
8fac7c1a41
6 changed files with 42 additions and 14 deletions
|
|
@ -1,16 +1,16 @@
|
|||
package templater
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"text/template"
|
||||
"bytes"
|
||||
|
||||
"github.com/tazjin/kontemplate/context"
|
||||
"github.com/polydawn/meep"
|
||||
"github.com/tazjin/kontemplate/context"
|
||||
)
|
||||
|
||||
// Error that is caused by non-existent template files being specified
|
||||
|
|
@ -28,7 +28,7 @@ func LoadAndPrepareTemplates(c *context.Context) ([]string, error) {
|
|||
output := make([]string, 0)
|
||||
|
||||
for _, rs := range c.ResourceSets {
|
||||
fmt.Fprintf(os.Stderr,"Loading resources for %s\n", rs.Name)
|
||||
fmt.Fprintf(os.Stderr, "Loading resources for %s\n", rs.Name)
|
||||
|
||||
rp := path.Join(c.BaseDir, rs.Name)
|
||||
files, err := ioutil.ReadDir(rp)
|
||||
|
|
@ -40,7 +40,6 @@ func LoadAndPrepareTemplates(c *context.Context) ([]string, error) {
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
for _, file := range files {
|
||||
if !file.IsDir() && isResourceFile(file) {
|
||||
p := path.Join(rp, file.Name())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue