Skip to content

Instantly share code, notes, and snippets.

View nitishgupta's full-sized avatar

Nitish Gupta nitishgupta

View GitHub Profile
@nitishgupta
nitishgupta / utils.libsonnet
Created August 9, 2019 14:22
Parse boolean and numbers in jsonnet from environment variables
{
boolparser(x)::
if x == "true" then true
else false
}
{
parse_number(x)::
local a = std.split(x, ".");
if std.length(a) == 1 then