pulumi/sdk/go/common/util
Abhinav Gupta 7bddec255d
sdk/go: Prefer contract.Assertf over Assert
Migrates all uses of contract.{Assert, AssertNoError, Require} in sdk/
to the `*f` variants that are required to provide more error context.

Step towards deprecating non-f variants entirely.

For context, `contract.Require` is similar to `contract.Assert`,
except it has a required parameter name as an argument:

    func Require(cond bool, param string)
    func Requiref(cond bool, param string, msg string, args ...any)

It includes the parameter name in the error message by default,
so the `msg` and `args` should only describe the constraint
without naming the parameter.

Refs #12132
2023-02-15 10:22:43 -08:00
..
archive all: Drop ioutil 2023-01-06 16:35:14 -08:00
buildutil sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
ciutil chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
cmdutil cmd/stack output: Print to an io.Writer 2023-01-25 15:17:18 -08:00
contract [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
deepcopy ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
env gosimple: printf, time.Since, TrimPrefix, etc. 2023-01-12 09:55:34 -08:00
executable ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
fsutil all: Drop ioutil 2023-01-06 16:35:14 -08:00
gitutil cli: Fix issue with pulumi new and unstaged files 2022-10-27 22:39:31 +01:00
goversion gosimple: printf, time.Since, TrimPrefix, etc. 2023-01-12 09:55:34 -08:00
httputil all: Drop ioutil 2023-01-06 16:35:14 -08:00
logging Fix 'TestFilter' error where expected and actual are swapped. 2023-02-10 13:26:49 -08:00
mapper sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
result ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
retry move pkg/util/retry -> sdk/go/common/util/retry 2020-03-18 15:47:01 -07:00
rpcutil sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
yamlutil yamlutil: Export 2-space encoder and refactor encoding package to use 2022-12-10 14:26:14 -08:00