Austin Clements writes:
> Hah. I guess nobody has tried to modify a notmuch database using the
> Go bindings.
>
> Could this instead assign the constants to
> C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their
> values? It would be nice to do that for the Status values as
Using iota is the correct way to get the values in the enum increment
automatically. The old code would just set all the enum values to 0.
---
bindings/go/src/notmuch/notmuch.go |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bindings/go/src/notmuch/notmuch.go
Hah. I guess nobody has tried to modify a notmuch database using the
Go bindings.
Could this instead assign the constants to
C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their
values? It would be nice to do that for the Status values as well
(which are correctly using iota,
Using iota is the correct way to get the values in the enum increment
automatically. The old code would just set all the enum values to 0.
---
bindings/go/src/notmuch/notmuch.go |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bindings/go/src/notmuch/notmuch.go
Hah. I guess nobody has tried to modify a notmuch database using the
Go bindings.
Could this instead assign the constants to
C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their
values? It would be nice to do that for the Status values as well
(which are correctly using iota,
Austin Clements amdra...@mit.edu writes:
Hah. I guess nobody has tried to modify a notmuch database using the
Go bindings.
Could this instead assign the constants to
C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their
values? It would be nice to do that for the Status