@@ -11,23 +11,23 @@ import (
1111 "golift.io/version"
1212)
1313
14- func parseFlags (pwd string ) (xt.Job , * flags ) {
14+ func parseFlags (pwd string ) (* xt.Job , * flags ) {
1515 flag .Usage = func () {
1616 // XXX: Write more "help" info here.
1717 fmt .Println ("If you pass a directory, this app will extract every archive in it." )
1818 fmt .Printf ("Usage: %s [-v] [--output <path>] <path> [paths...]\n " , os .Args [0 ])
1919 flag .PrintDefaults ()
2020 os .Exit (0 )
2121 }
22- job := xt.Job {}
22+ job := & xt.Job {}
2323 flags := & flags {}
2424
2525 flag .BoolVarP (& flags .PrintVer , "version" , "v" , false , "Print application version and exit" )
2626 // These cli options create 1 job. Using job files creates N jobs.
2727 flag .StringVarP (& job .Output , "output" , "o" , pwd , "Output directory, default is current directory" )
2828 flag .UintVarP (& job .MaxDepth , "max-depth" , "d" , 0 , "Maximum folder depth to recursively search for archives." )
2929 flag .UintVarP (& job .MinDepth , "min-depth" , "m" , 0 , "Minimum folder depth to recursively search for archives." )
30- //flag.UintVarP(&job.Recurse, "recurse", "r", 0, "Extract archives inside archives, up to this depth.")
30+ // flag.UintVarP(&job.Recurse, "recurse", "r", 0, "Extract archives inside archives, up to this depth.")
3131 flag .StringSliceVarP (& job .Passwords , "password" , "P" , nil , "Attempt these passwords for rar and 7zip archives." )
3232 flag .StringSliceVarP (& flags .JobFiles , "job-file" , "j" , nil , "Read additional extraction jobs from these files." )
3333 // Preserve paths?
@@ -77,7 +77,7 @@ func main() {
7777
7878 // Extract the jobs.
7979 for i , job := range jobs {
80- log .Printf ("Starting Job %d of %d with %d paths, output: % s" , i + 1 , len (jobs ), len ( job . Paths ), job . Output )
81- xt .Extract (& job )
80+ log .Printf ("Starting Job %d of %d with %s" , i + 1 , len (jobs ), job )
81+ xt .Extract (job )
8282 }
8383}
0 commit comments