delve/vendor/github.com/google/go-dap
Hyang-Ah Hana Kim 1433c07957
dap: define LaunchConfig/AttachConfig types (#2571)
Formally define these types and document their meaning.
We will auto-generate the dlv-dap documentation from these Go type doc.

mapToStruct is a helper that sets the given struct's fields with the
info in map[string]interface{} (launch/attach's Arguments). We achieve
this by reencoding map[string]interface{} to json and decoding back to
the target struct. If go-dap left the implementation-specific arguments
as json.RawMessage and let the implementation decode as needed, this
reencoding could've been avoided.

encoding/json itself does not have mean to enforce required fields.
There was a test case that checks substitutePath elements must set
both from/to fields. Path.UnmarshalJSON implements the check.
I am not yet sure about the need for distinction between missing
'from/to' and empty strings yet. (empty value is useful when dealing with
a binary built with trimpath, right?)

A minor behavior change - previously, if noDebug is not a boolean type,
we ignored the attribute silently. Since we use json decoding, any
mismatched types will cause an error and this non-boolean type noDebug
attribute will result in launch failure.
2021-08-26 14:42:58 +02:00
..
.travis.yml dap: define LaunchConfig/AttachConfig types (#2571) 2021-08-26 14:42:58 +02:00
codec.go go.mod: update google/go-dap to 0.5.0 (#2460) 2021-05-04 12:33:50 -07:00
doc.go all: update github.com/spf13/cobra to v1.1.3 (#2572) 2021-07-22 11:05:37 -07:00
go.mod service/dap: Initial implementation for 'dlv dap' (#1858) 2020-02-15 11:52:53 -08:00
io.go go.mod: update google/go-dap to 0.5.0 (#2460) 2021-05-04 12:33:50 -07:00
LICENSE service/dap: Initial implementation for 'dlv dap' (#1858) 2020-02-15 11:52:53 -08:00
README.md dap: define LaunchConfig/AttachConfig types (#2571) 2021-08-26 14:42:58 +02:00
schematypes.go dap: define LaunchConfig/AttachConfig types (#2571) 2021-08-26 14:42:58 +02:00

go-dap: Go implementation of the Debug Adapter Protocol

PkgGoDev Build Status Go Report Card

For an overview of DAP, see https://microsoft.github.io/debug-adapter-protocol/overview

Contributing

We'd love to accept your patches and contributions to this project. See docs/contributing for more details.

License

This project is licensed under the Apache License 2.0

This is not an officially supported Google product.