File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
33import  (
44	"archive/tar" 
55	"bytes" 
6+ 	"crypto/md5" 
67	"encoding/json" 
78	"fmt" 
89	"io" 
@@ -68,6 +69,7 @@ func main() {
6869}
6970
7071func  printFilesInTar (parentReader  * tar.Reader , h  * tar.Header ) {
72+ 	hasher  :=  md5 .New 
7173	size  :=  h .Size 
7274	tarredBytes  :=  make ([]byte , size )
7375	_ , err  :=  parentReader .Read (tarredBytes )
@@ -92,6 +94,7 @@ func printFilesInTar(parentReader *tar.Reader, h *tar.Header) {
9294
9395		switch  header .Typeflag  {
9496		case  tar .TypeDir :
97+ 			fmt .Println ("	Directory: " , name )
9598			continue 
9699		case  tar .TypeReg :
97100			fmt .Println ("	File: " , name )
@@ -110,6 +113,15 @@ func printFilesInTar(parentReader *tar.Reader, h *tar.Header) {
110113	}
111114}
112115
116+ func  makeEntry (r  * tar.Reader , h  * tar.Header ) {
117+ 
118+ }
119+ 
120+ type  FileChangeInfo  struct  {
121+ 	typeflag  int 
122+ 	md5sum    [16 ]byte 
123+ }
124+ 
113125type  Manifest  struct  {
114126	Config    string 
115127	RepoTags  []string 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments