-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .CreatedAt
placeholder for docker network ls --format
#29900
Add .CreatedAt
placeholder for docker network ls --format
#29900
Conversation
This fix tries to add a placeholder `.CreatedAt` for Go format template in `docker network ls --format`. While working on 29226, I noticed that it is not possible to display network's creation time in `docker network ls`, with or without `--format`. We are able to find the timestamp through `docker network inspect` though. However, as we allows networks to be pruned based on the timestamp (see 29226), showing the timestamp in `docker network ls --format` would be much useful now. This fix adds the `.CreatedAt` placeholder for `docker network ls --format`. The default output was not changed for `docker network ls --format`. A test case for unit tests has been added. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
SGTM but why not "Created"? |
@AkihiroSuda this is mostly to align with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
design LGTM 🐯
/cc @thaJeztah @dnephin
Yup, design LGTM |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, moving to doc review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐸
/cc @thaJeztah
@thaJeztah PTAL? |
`.Internal` | Whether the network is internal or not. | ||
`.Labels` | All labels assigned to the network. | ||
`.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}` | ||
`.CreatedAt` | Time when the network was created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc SGTM but I'm wondering why changes are 10 lines instead of 1 insertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad. It's from formatting the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…ted-at Add `.CreatedAt` placeholder for `docker network ls --format`
- What I did
This fix tries to add a placeholder
.CreatedAt
for Go format template indocker network ls --format
.While working on #29226, I noticed that it is not possible to display network's creation time in
docker network ls
, with or without--format
.We are able to find the timestamp of the network through
docker network inspect
though.However, as we allow networks to be pruned based on the timestamp (see #29226), showing the timestamp in
docker network ls --format
would be much useful now.- How I did it
This fix adds the
.CreatedAt
placeholder fordocker network ls --format
.The default output was not changed for
docker network ls --format
.- How to verify it
A test case for unit tests has been added.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Yong Tang yong.tang.github@outlook.com