MCPcopy Index your code
hub / github.com/dagger/dagger / assertNotNil

Function assertNotNil

sdk/python/runtime/internal/dagger/dagger.gen.go:43–50  ·  view source on GitHub ↗

assertNotNil panic if the given value is nil. This function is used to validate that input with pointer type are not nil. See https://github.com/dagger/dagger/issues/5696 for more context.

(argName string, value any)

Source from the content-addressed store, hash-verified

41// This function is used to validate that input with pointer type are not nil.
42// See https://github.com/dagger/dagger/issues/5696 for more context.
43func assertNotNil(argName string, value any) {
44 // We use reflect because just comparing value to nil is not working since
45 // the value is wrapped into a type when passed as parameter.
46 // E.g., nil become (*dagger.File)(nil).
47 if reflect.ValueOf(value).IsNil() {
48 panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName))
49 }
50}
51
52type DaggerObject interface {
53 querybuilder.GraphQLMarshaller

Callers 15

WithChangesetMethod · 0.70
ImportMethod · 0.70
WithDirectoryMethod · 0.70
WithEnvFileVariablesMethod · 0.70
WithFileMethod · 0.70
WithMountedCacheMethod · 0.70
WithMountedDirectoryMethod · 0.70
WithMountedFileMethod · 0.70
WithMountedSecretMethod · 0.70
WithRegistryAuthMethod · 0.70
WithRootfsMethod · 0.70
WithSecretVariableMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected