Comments (5)
Another func:
func Join(separator string, value []interface{}) string {
defer func() {
recover()
}()
sb := &strings.Builder{}
for i, v := range value {
_, _ = fmt.Fprintf(sb, "%v", v)
if i != len(value)-1 {
_, _ = fmt.Fprintf(sb, separator)
}
}
return sb.String()
}
I can user it like this:
{{ .foo | join "," }}
from frep.
pull request is welcome 😄
from frep.
Actually, we already have join
from frep.
OK.
I'll do the late. It's busy now.
from frep.
PR #19 .
merge please.
from frep.
Related Issues (20)
- Issue a new release ? HOT 4
- How to access environment inside the range? HOT 2
- 使用load 选项读取文件 可以设置默认key? HOT 2
- Is it a bug or what ? HOT 2
- New release HOT 2
- Please use uptodated 'Masterminds/sprig' HOT 3
- Build on ppc64le fails to generate correct artifacts HOT 1
- `--missing error` does not work with 'include'
- Do not use environment variables by default - security issue HOT 1
- 使用 toml 作为配置文件 异常
- Feature Request: Allow to define default value HOT 2
- ARM builds? HOT 2
- arm64 支持 HOT 1
- Unable to install on macOS : Invalid formula HOT 2
- Security Update
- Please preserve file permissions HOT 4
- Debian packaging HOT 2
- 配置文件中的数组类型怎么判断最后一个元素呢 HOT 1
- latest binary does not work under alpine HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frep.