-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the sprig functions in the template engine #1891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read the contributing guide to know how to add dependencies.
https://github.com/containous/traefik/blob/master/.github/CONTRIBUTING.md#setting-up-glide-and-glide-vc-for-dependency-management
build.Dockerfile
Outdated
@@ -12,7 +12,8 @@ RUN go get github.com/jteeuwen/go-bindata/... \ | |||
&& go get github.com/kisielk/errcheck \ | |||
&& go get github.com/client9/misspell/cmd/misspell \ | |||
&& go get github.com/mattfarina/glide-hash \ | |||
&& go get github.com/sgotti/glide-vc | |||
&& go get github.com/sgotti/glide-vc \ | |||
&& go get github.com/Masterminds/sprig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this, we don't manage dependencies like that: https://github.com/containous/traefik/blob/master/.github/CONTRIBUTING.md#setting-up-glide-and-glide-vc-for-dependency-management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Could you do that:
|
please follow exactly my previous comment:
|
Hi @thomasbach76, thanks for your great contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Could you add some explanations and a reference to sprig in our documentation?
provider/provider_test.go
Outdated
if configuration == nil { | ||
t.Fatal("Configuration should not be nil, but was") | ||
} | ||
if n := len(configuration.Backends); n != 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n := len(configuration.Backends); n != 1
--> len(configuration.Backends) != 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
LGTM!
Not sure why the semaphoreci check failed here... |
It's not you, I have relaunch the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR is the implementation of #1848. Basically it adds the sprig library (https://github.com/Masterminds/sprig) to the template engine.