Tags: google/go-dap
Tags
Use the `any` alias for `interface{}` (#91) This alias was added in go 1.18, which has been out for a while already. As `strings.Title()` is deprecated this PR also implements `goFieldName()` with a hand-rolled implementation which handles unicode correctly. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Move interface method to embedded type (#85) This makes it easier to implement the ResponseMessage/RequestMessage/EventMessage interface, because you only need to embed Response/Request/Message, respectively. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Optimize message parsing (#79) So far, the message was parsed three times: 1) To determine if it is a request/response/event (->Type) 2) To determine the command (->Command/Event/Success) to determine the right ctor 3) A final pass with the right ctor Steps 1+2 can be combined into a single step by using a union type of the fields that are required to determine the right ctor. This PR does exactly that. It combines steps 1+2 so that the message needs to be parsed only once to determine the ctor. The final parsing step (3) with the right ctor can of course not be elided. So the number of parsing operations is reduced from 3 to 2. This is a big win, because JSON parsing is slow, especially for large messages.
Make `Source` field in `Breakpoint` events optional (#67) * Make `Source` field in `Breakpoint` events optional Fixes #66 * cmd/gentypes: update code generator to make Source a pointer This updates the gentypes to make the Source field of Breakpoint a pointer in the generated Go types. For #66 Co-authored-by: Suzy Mueller <suzmue@golang.org>
cmd/gentypes: sync at DAP @ 1.47 (#56) * cmd/gentypes: sync at DAP @ 1.47 https://github.com/microsoft/vscode-debugadapter-node/tree/049665a465bf74e5f78d648469acbef95f4b16fd According to the spec, RestartArguments uses a union type (oneOf) and Go does not have a union type. Both LaunchRequestArguments and AttachRequestArguments are represented as map[string]interface{}, so we may attempt to map this to map[string]interface{}. But if the spec starts to include other types in the union, this will be a problem. For now, use interface{}. Added -u and -o flags, and use them with the go generate tool. * gentypes: adjust the usage error message
PreviousNext