Repository: opentofu/opentofu
File: internal/lang/funcs/descriptions.go (Go)

Code before:
	"contains": {
		Description:      "`contains` determines whether a given list or set contains a given single value as one of its elements.",
		ParamDescription: []string{"", ""},
	},
	"csvdecode": {
		Description:      "`csvdecode` decodes a string containing CSV-formatted data and produces a list of maps representing that data.",
		ParamDescription: []string{""},
	},
	"dirname": {
		Description:      "`dirname` takes a string containing a filesystem path and removes the last portion from it.",
		ParamDescription: []string{""},
	},
	"distinct": {
		Description:      "`distinct` takes a list and returns a new list with any duplicate elements removed.",
		ParamDescription: []string{""},
	},
	"element": {
		Description:      "`element` retrieves a single element from a list.",
		ParamDescription: []string{"", ""},
	},
	"endswith": {
		Description:      "`endswith` takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.",
		ParamDescription: []string{"", ""},
	},
	"ephemeralasnull": {
		Description:      "`ephemeralasnull` sanitizes the input, replacing any ephemeral values with the null value of the corresponding type.",
		ParamDescription: []string{""},
	},
	"file": {
		Description:      "`file` reads the contents of a file at the given path and returns them as a string.",
		ParamDescription: []string{""},
	},
	"filebase64": {
		Description:      "`filebase64` reads the contents of a file at the given path and returns them as a base64-encoded string.",
		ParamDescription: []string{""},
	},
	"filebase64sha256": {
		Description:      "`filebase64sha256` is a variant of `base64sha256` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},
	},
	"filebase64sha512": {
		Description:      "`filebase64sha512` is a variant of `base64sha512` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},
	},
	"fileexists": {
		Description:      "`fileexists` determines whether a file exists at a given path.",
		ParamDescription: []string{""},
	},
	"filemd5": {
		Description:      "`filemd5` is a variant of `md5` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},

Review comment (security):
```suggestion
		Description:      "`ephemeralasnull` replaces any ephemeral values in the given value with a null value of the corresponding type.",
```

("sanitizes the input" doesn't seem to be adding anything here and raises questions about what "sanitize" might mean in this context.)


Code after:
	"contains": {
		Description:      "`contains` determines whether a given list or set contains a given single value as one of its elements.",
		ParamDescription: []string{"", ""},
	},
	"csvdecode": {
		Description:      "`csvdecode` decodes a string containing CSV-formatted data and produces a list of maps representing that data.",
		ParamDescription: []string{""},
	},
	"dirname": {
		Description:      "`dirname` takes a string containing a filesystem path and removes the last portion from it.",
		ParamDescription: []string{""},
	},
	"distinct": {
		Description:      "`distinct` takes a list and returns a new list with any duplicate elements removed.",
		ParamDescription: []string{""},
	},
	"element": {
		Description:      "`element` retrieves a single element from a list.",
		ParamDescription: []string{"", ""},
	},
	"endswith": {
		Description:      "`endswith` takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix.",
		ParamDescription: []string{"", ""},
	},
	"ephemeralasnull": {
		Description:      "`ephemeralasnull` replaces any ephemeral values in the given value with a null value of the corresponding type.",
		ParamDescription: []string{""},
	},
	"file": {
		Description:      "`file` reads the contents of a file at the given path and returns them as a string.",
		ParamDescription: []string{""},
	},
	"filebase64": {
		Description:      "`filebase64` reads the contents of a file at the given path and returns them as a base64-encoded string.",
		ParamDescription: []string{""},
	},
	"filebase64sha256": {
		Description:      "`filebase64sha256` is a variant of `base64sha256` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},
	},
	"filebase64sha512": {
		Description:      "`filebase64sha512` is a variant of `base64sha512` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},
	},
	"fileexists": {
		Description:      "`fileexists` determines whether a file exists at a given path.",
		ParamDescription: []string{""},
	},
	"filemd5": {
		Description:      "`filemd5` is a variant of `md5` that hashes the contents of a given file rather than a literal string.",
		ParamDescription: []string{""},