-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix usage example in README.md #6
Conversation
|
||
configuration := configuration.New( | ||
configuration.TestEnvironment, | ||
&configuration.Pkcs12{Content: certificate), Password: "p12 password"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we had an extra bracket, removed it
|
||
configuration := configuration.New( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed the var so that it doesn't shadow the package
|
||
payload := bankid.SignPayload{PersonalNumber: "<INSERT PERSONAL NUMBER>", EndUserIp: "192.168.1.1", UserVisibleData: "Test"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the wrong case for payload property
|
||
response, err := bankId.Sign(&payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need context argument for this method
|
||
fmt.Println(response.Collect()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need context argument for Collect()
method too
|
||
if err != nil { | ||
if response := bankid.UnwrapErrorResponse(err); response != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't find the UnwrapErrorResponse()
function, but it works fine if try to cast it (tested)
Thanks for the contribution! |
Now the code example in README is not working, updated it to be runnable. This closes #7