mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-18 13:10:02 +02:00
parent
366fbb5207
commit
08fd77d0de
4 changed files with 109 additions and 47 deletions
|
|
@ -28,3 +28,12 @@ func PickID(id ID) CallOption {
|
|||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// StringID returns a call option that instructs the request ID to be set as a
|
||||
// string.
|
||||
func StringID() CallOption {
|
||||
return callOptionFunc(func(r *Request) error {
|
||||
r.ID.IsString = true
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue