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

change to return a pointer of xxError struct #1

Merged
merged 1 commit into from
Jan 10, 2016

Conversation

k-sone
Copy link
Owner

@k-sone k-sone commented Jan 10, 2016

How to migrate your code

 import "github.com/k-sone/snmpgo"
 ...
     pdu, err := snmp.GetBulkWalk(oids, 0, 10)
     switch e := err.(type) {
-    case snmpgo.ArgumentError:
+    case *snmpgo.ArgumentError:
         ...    // handle ArgumentError
-    case snmpgo.ResponseError:
+    case *snmpgo.ResponseError:
         ...    // handle ResponseError
     }
 ...

k-sone added a commit that referenced this pull request Jan 10, 2016
change to return a pointer of xxError struct
@k-sone k-sone merged commit 12d8005 into v2.0.0-dev Jan 10, 2016
@k-sone k-sone deleted the return-error-pointer branch January 10, 2016 07:37
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.

1 participant