Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Jukovec committed Apr 28, 2024
1 parent 95c7afc commit d8a692b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crud/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,22 @@ func ExampleResult_many() {
// [[2010 45 bla] [2011 4 bla]]
}

// ExampleLenRequest demonstrates how to execute the LenRequest type.
func ExampleLenRequest() {
conn := exampleConnect()
req := crud.MakeLenRequest(exampleSpace)

ret := crud.LenResult{}
if err := conn.Do(req).GetTyped(&ret); err != nil {
fmt.Printf("Failed to execute request: %s", err)
return
}

fmt.Println(ret.Value)
// Output:
// 4
}

// ExampleResult_noreturn demonstrates noreturn request: a data change
// request where you don't need to retrieve the result, just want to know
// whether it was successful or not.
Expand Down

0 comments on commit d8a692b

Please sign in to comment.