ternary + go template ternary operator How can I conditionally set a variable in a Go template based on an expression which may cause an error if not wrapped with an if statement - Stack OverflowQuestion How do I do something like this: {{ $use_ssl := (ne $.Env.CERT_NAME "") }} where $.Env.CERT_NAME may be nil/undefined. If it is nil, it gives this error: at <ne $.Env.CERT_NAME ""&g... wono | discuss | tweet
+ go template ternary operator How can I conditionally set a variable in a Go template based on an expression which may cause an error if not wrapped with an if statement - Stack OverflowQuestion How do I do something like this: {{ $use_ssl := (ne $.Env.CERT_NAME "") }} where $.Env.CERT_NAME may be nil/undefined. If it is nil, it gives this error: at <ne $.Env.CERT_NAME ""&g... wono | discuss | tweet