Displaying 2 results from an estimated 2 matches for "bd09ae9cf".
2020 Feb 19
1
[PATCH] golang: make API idiomatic so that functions return (<val>, error)
...libguestfs functions return can be
a *GuestfsError, but the function signature should have (<val>, error)
as return value.
---
generator/golang.ml | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/generator/golang.ml b/generator/golang.ml
index bd09ae9cf..e11967d57 100644
--- a/generator/golang.ml
+++ b/generator/golang.ml
@@ -114,6 +114,11 @@ func (e *GuestfsError) String() string {
}
}
+/* Implement the error interface */
+func (e *GuestfsError) Error() string {
+ return e.String()
+}
+
func get_error_from_handle (g *Guestfs, op strin...
2019 Apr 23
8
[PATCH 0/7] Make deprecation warnings more prominent
Since there are deprecated APIs, make sure that users notice they are
deprecated in more prominent ways than done so far:
- using deprecated C functions now warns by default
- it is possible to use the C library making sure no deprecated function
is ever used
- Python/Ruby/Perl scripts now get warning messages (configured
according to their own systems) when deprecated functions are used
The