feat!: update get from (V, error) to (V, bool)
#20
Reference in New Issue
Block a user
Delete Branch "feat/get-no-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Currently, the signature for
Table.Getisfunc (K) (V, error). This is not very Go-idiomatic, which prefers to return a boolean instead of an error. For instance, a built-in Go map is used like so:Updating our table to look like that is best practice. In that same vein, to support direct lookup (i.e.
v := users[id]), this PR also addsTable.Find.Changes
Table.Gettofunc (K) (V, bool). Returns 'false' is the item cannot be found, and 'true' if it is found.Table.Find.Design Decisions
Checklist
feat!: update get from (V, error) to (V, bool)to feat!: update get from `(V, error)` to `(V, bool)`