pulumi/sdk/go/common/util/mapper
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
..
errors.go move pkg/util/mapper -> sdk/go/common/util/mapper 2020-03-18 14:47:37 -07:00
mapper.go chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
mapper_decode.go sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
mapper_encode.go sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
mapper_test.go Fix mapper panic on map[string]*string handling 2022-12-06 11:03:15 -08:00
object.go move pkg/util/mapper -> sdk/go/common/util/mapper 2020-03-18 14:47:37 -07:00