Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cassette] pass cassette pointer to yaml unmarshal instead pointer-to… #84

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

asad-urrahman
Copy link
Contributor

The cassete New() initialize cassete and returns a pointer, which can be passed directly to YAML unmarshal. no need to pass the pointer-to-pointer since its already initialized.

The cassete load panics with nil pointer exception with me. In this case, the issue seems in the YAML itself but passing a simple pointer solve here.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x1076e32]

goroutine 7 [running]:
testing.tRunner.func1.2({0x109f9e0, 0x12c3290})
        C:/Program Files/Go/src/testing/testing.go:1526 +0x24e
testing.tRunner.func1()
        C:/Program Files/Go/src/testing/testing.go:1529 +0x39f
panic({0x109f9e0, 0x12c3290})
        C:/Program Files/Go/src/runtime/panic.go:884 +0x213
gopkg.in/dnaeon/go-vcr.v3/cassette.Load({0xc000f06960, 0x2c})
        C:/Users/asadrahman/go/pkg/mod/gopkg.in/dnaeon/go-vcr.v3@v3.1.2/cassette/cassette.go:280 +0xb2

...
...

@dnaeon dnaeon merged commit 64ebe73 into dnaeon:v3 Jun 21, 2023
4 checks passed
@dnaeon
Copy link
Owner

dnaeon commented Jun 21, 2023

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants