mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: add utilities to encode platforms
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -17,11 +17,11 @@ func (cli *Client) ImageHistory(ctx context.Context, imageID string, opts image.
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p, err := json.Marshal(*opts.Platform)
|
||||
p, err := encodePlatform(opts.Platform)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid platform: %v", err)
|
||||
}
|
||||
query.Set("platform", string(p))
|
||||
query.Set("platform", p)
|
||||
}
|
||||
|
||||
var history []image.HistoryResponseItem
|
||||
|
||||
Reference in New Issue
Block a user