delve/go.mod
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

23 lines
793 B
Modula-2

module github.com/go-delve/delve
go 1.16
require (
github.com/aquasecurity/libbpfgo v0.1.2-0.20210708203834-4928d36fafac
github.com/cosiner/argv v0.1.0
github.com/creack/pty v1.1.9
github.com/derekparker/trie v0.0.0-20200317170641-1fdf38b7b0e9
github.com/google/go-dap v0.5.1-0.20210713061233-c91b005e3987
github.com/hashicorp/golang-lru v0.5.4
github.com/mattn/go-colorable v0.0.9
github.com/mattn/go-isatty v0.0.3
github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b
github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v1.1.3
go.starlark.net v0.0.0-20200821142938-949cc6f4b097
golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015
golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f
gopkg.in/yaml.v2 v2.4.0
)