Wednesday, 19 August 2020

What is The Purpose Of Dash Inside Curly Braces In Helm Template

Helm's template internally uses Golang template language. In Go template, dash is used in curly braces to skip white-space around it.

Let's take an example. Suppose {{$test}} evaluates to "ok".

1

{{$test}}

2

will be rendered as

1

ok

2


1

{{- $test}}

2

will be rendered as

1ok

2


1

{{$test -}}

2

will be rendered as

1

ok2


1

{{- $test -}}

2

will be rendered as

1ok2



No comments:

Post a comment

How To Solve "Caused by: org.hibernate.HibernateException: Missing table" When Table Is Present In Database

If you are using JPA or Hibernate directly and got that exception while starting your application, there is one obvious reason for that. You...