We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As mentioned in the README already, something like List(interface{}) error or GetAll(interface{}) error should be implemented.
List(interface{}) error
GetAll(interface{}) error
Example of how a user could pass a slice which the List method then populates with values:
List
package main import ( "encoding/json" "fmt" ) type foo struct { Bar string } // myFunc is meant to populate the passed slice of pointers func myFunc(vals interface{}) { j := []byte(`[{"Bar":"baz1"},{"Bar":"baz2"}]`) err := json.Unmarshal(j, vals) if err != nil { panic(err) } } func main() { fmt.Println("Hello world!") vals := make([]foo, 0) myFunc(&vals) fmt.Println("vals:") for _, v := range vals { fmt.Printf("%+v\n", v) } }
Output:
Hello world! vals: {Bar:baz1} {Bar:baz2}
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
feat(redis): Add support for Keys() to Redis
16c0a34
See https://pkg.go.dev/github.com/redis/go-redis/v9#Client.Scan Related to philippgille#9 Signed-off-by: Boris Glimcher <[email protected]>
88fed61
No branches or pull requests
As mentioned in the README already, something like
List(interface{}) error
orGetAll(interface{}) error
should be implemented.Example of how a user could pass a slice which the
List
method then populates with values:Output:
The text was updated successfully, but these errors were encountered: