@@ -32,9 +32,19 @@ struct Response {
3232
3333pub async fn run ( options : TagsOptions ) -> anyhow:: Result < ( ) > {
3434 macro_rules! row {
35- ( $( $values: tt) * ) => {
36- println!( "{:10} {:8.8} {:6.6} {:15} {}" , $( $values) * )
37- }
35+ ( $size: expr, $os: expr, $arch: expr, $push: expr, $digest: expr, $name: expr) => {
36+ if options. digest {
37+ println!(
38+ "{:10} {:8.8} {:6.6} {:14} {:73} {}" ,
39+ $size, $os, $arch, $push, $digest, $name
40+ )
41+ } else {
42+ println!(
43+ "{:10} {:8.8} {:6.6} {:15} {}" ,
44+ $size, $os, $arch, $push, $name
45+ )
46+ }
47+ } ;
3848 }
3949
4050 let filter_os;
@@ -79,7 +89,7 @@ pub async fn run(options: TagsOptions) -> anyhow::Result<()> {
7989 if page == 1 {
8090 println ! ( "- {} results for {}" , response. count, repository) ;
8191
82- row ! ( "SIZE" , "OS" , "ARCH" , "LAST PUSHED" , "NAME" ) ;
92+ row ! ( "SIZE" , "OS" , "ARCH" , "LAST PUSHED" , "DIGEST" , " NAME") ;
8393 }
8494
8595 if response. results . is_empty ( ) {
@@ -112,6 +122,7 @@ pub async fn run(options: TagsOptions) -> anyhow::Result<()> {
112122 image. os,
113123 image. architecture,
114124 last_updated,
125+ image. digest. as_deref( ) . unwrap_or_default( ) ,
115126 result. name
116127 ) ;
117128 }
0 commit comments