Skip to content

Commit

Permalink
Fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwiersma committed Feb 13, 2019
1 parent 0917d97 commit d138c83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
9 changes: 7 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package ren
import (
"bytes"
"errors"
"strings"
"text/template"

"github.com/Masterminds/sprig"
"github.com/hamba/pkg/log"
"github.com/hamba/pkg/stats"
)
Expand Down Expand Up @@ -43,7 +43,12 @@ func (a *Application) Render(path string, data interface{}) ([]byte, error) {
return nil, ErrTemplateNotFound
}

tmpl, err := template.New("template").Funcs(sprig.FuncMap()).Parse(svg)
tmpl, err := template.New("template").Funcs(template.FuncMap{
"trim": strings.TrimSpace,
"upper": strings.ToUpper,
"lower": strings.ToLower,
"title": strings.Title,
}).Parse(svg)
if err != nil {
return nil, err
}
Expand Down
8 changes: 0 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
module github.com/nrwiersma/ren

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/Masterminds/sprig v2.18.0+incompatible
github.com/go-zoo/bone v0.0.0-20190117145001-d7ce1372afa7
github.com/google/uuid v1.1.0 // indirect
github.com/hamba/cmd v1.0.0
github.com/hamba/pkg v1.0.0
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/joho/godotenv v1.3.0
github.com/stretchr/testify v1.3.0
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 // indirect
gopkg.in/urfave/cli.v1 v1.20.0
gopkg.in/yaml.v2 v2.2.2 // indirect
)
18 changes: 0 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/sprig v2.18.0+incompatible h1:QoGhlbC6pter1jxKnjMFxT8EqsLuDE6FEcNbWEpw+lI=
github.com/Masterminds/sprig v2.18.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/cactus/go-statsd-client v3.1.1+incompatible h1:p97okCU2aaeSxQ6KzMdGEwQkiGBMys71/J0XWoirbJY=
github.com/cactus/go-statsd-client v3.1.1+incompatible/go.mod h1:cMRcwZDklk7hXp+Law83urTHUiHMzCev/r4JMYr/zU0=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-zoo/bone v0.0.0-20190117145001-d7ce1372afa7 h1:9j1EAzjykFGj2YY/+Y1TcEQMf5eAEOzbnPUMT9YYb5g=
github.com/go-zoo/bone v0.0.0-20190117145001-d7ce1372afa7/go.mod h1:HI3Lhb7G3UQcAwEhOJ2WyNcsFtQX1WYHa0Hl4OBbhW8=
github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s=
github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hamba/cmd v1.0.0 h1:Y1CALuyALRxrcmWrMBQedIYbWQGc0CFDhIouCk73RuM=
github.com/hamba/cmd v1.0.0/go.mod h1:myE1d4ECiJ2wUKVxTqBFTQRWs1dgIPeu5zCafFdzlG4=
github.com/hamba/logger v1.0.0 h1:oU48YnlHhXICxxVWPzE7xM8r4CXWCGOmVTOm/JmGlus=
Expand All @@ -21,10 +13,6 @@ github.com/hamba/pkg v1.0.0 h1:Z6Y2kja4z5Ce1pZbjxZsK2jxh9NN90vpB0lW2CjZ61M=
github.com/hamba/pkg v1.0.0/go.mod h1:muS6DCTRl5XJTTkg0FQMJszkpYMe+JLOxwOnPQQbh14=
github.com/hamba/statter v1.0.0 h1:clyD8AOc2gVdOLoDUYx4yjEn7lou1gOQMW5QNrWcvpM=
github.com/hamba/statter v1.0.0/go.mod h1:ZPPJZG6Vk3ZyFpVwb7fjxERWgAivDytrixBvvBCfPqY=
github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0=
github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE=
Expand All @@ -44,11 +32,5 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit d138c83

Please sign in to comment.