mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Copy the daemon/internal/timestamp package to internal client package
This change copies the daemon/internal/timestamp package (previously api/types/time) to an internal client package and updates the client usage for GetTimestamp functionality. Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/moby/moby/api/types/container"
|
||||
timetypes "github.com/moby/moby/api/types/time"
|
||||
"github.com/moby/moby/client/internal/timestamp"
|
||||
)
|
||||
|
||||
// ContainerLogs returns the logs generated by a container in an [io.ReadCloser].
|
||||
@@ -53,7 +53,7 @@ func (cli *Client) ContainerLogs(ctx context.Context, containerID string, option
|
||||
}
|
||||
|
||||
if options.Since != "" {
|
||||
ts, err := timetypes.GetTimestamp(options.Since, time.Now())
|
||||
ts, err := timestamp.GetTimestamp(options.Since, time.Now())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(`invalid value for "since": %w`, err)
|
||||
}
|
||||
@@ -61,7 +61,7 @@ func (cli *Client) ContainerLogs(ctx context.Context, containerID string, option
|
||||
}
|
||||
|
||||
if options.Until != "" {
|
||||
ts, err := timetypes.GetTimestamp(options.Until, time.Now())
|
||||
ts, err := timestamp.GetTimestamp(options.Until, time.Now())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(`invalid value for "until": %w`, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user