pulumi/tests/integration/construct_component_methods.../testcomponent-go
Abhinav Gupta ed5706ddb9
lint(govet): Enable nilness linter
govet includes a nilness linter that detects a few nil issues.
This linter is not enabled by default in govet because the `go` tool
does not want a dependency on the libraries necessary to implement this
(golang/go#59714).

Enable the nilness linter and fix the following issues found by it
(commentary below each check mine):

    pkg/cmd/pulumi/new.go:283:9: nilness: impossible condition: nil != nil (govet)
        ^- the error was very likely supposed to be the `os.Remove`
    pkg/cmd/pulumi/new.go:633:10: nilness: impossible condition: nil != nil (govet)
        ^- same error checked on the previous line
    pkg/cmd/pulumi/preview.go:190:11: nilness: impossible condition: nil != nil (govet)
        ^- same error checked a few blocks above
    pkg/codegen/pcl/binder_component.go:101:64: nilness: nil dereference in dynamic method call (govet)
        ^- err is guaranteed nil
    pkg/codegen/pcl/binder_component.go:133:10: nilness: impossible condition: nil != nil (govet)
        ^- err is guaranteed nil
    sdk/go/auto/errors_test.go:374:34: nilness: nil dereference in index operation (govet)
        ^- this is intentional; I replaced it with a deliberate panic
    tests/integration/construct_component_methods_resources/testcomponent-go/random.go:30:10: nilness: impossible condition: non-nil == nil (govet)
        ^- args is rejected if it's nil
2023-05-19 15:32:00 -07:00
..
.gitignore Add tests that create resources from methods (#7701) 2021-11-15 11:17:53 -08:00
PulumiPlugin.yaml Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
main.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
random.go lint(govet): Enable nilness linter 2023-05-19 15:32:00 -07:00