client: merge ExecInspectResult with ExecInspect

The `ExecInspectResult` type was embedding `ExecInspect`, which is also
defined by the client, so there's no need to abstract it.

While updating, also;

- Rename `ExecID` to `ID`, to match the field-name returned by the API.
- Rename `Pid` to `PID`, to be in the right casing.
- Remove `json` labels, as option-types are not (un)marshaled to JSON.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-24 14:20:46 +02:00
parent 378116a84f
commit 12123eb592
5 changed files with 30 additions and 40 deletions

View File

@@ -98,7 +98,7 @@ func TestExec(t *testing.T) {
inspect, err := apiClient.ExecInspect(ctx, res.ID, client.ExecInspectOptions{})
assert.NilError(t, err)
assert.Check(t, is.Equal(inspect.ExecID, res.ID))
assert.Check(t, is.Equal(inspect.ID, res.ID))
resp, err := apiClient.ExecAttach(ctx, res.ID, client.ExecAttachOptions{})
assert.NilError(t, err)