Remove the scan command

This commit is contained in:
rubyist 2014-10-09 11:24:05 -04:00
parent 47e134f67a
commit 2582e3e1d6
2 changed files with 0 additions and 43 deletions

@ -1,41 +0,0 @@
package commands
import (
"fmt"
"github.com/github/git-media/scanner"
"github.com/spf13/cobra"
)
var (
scanCmd = &cobra.Command{
Use: "scan",
Short: "Scan for git media files",
Run: scanCommand,
}
createLinks = false
)
func scanCommand(cmd *cobra.Command, args []string) {
pointers, err := scanner.Scan("")
if err != nil {
Panic(err, "Failed to scan")
}
// Now we have Pointer objects for all git media files.
// What can we do with them?
// Create link files
// Offer to download
// ?
// Profit
for _, p := range pointers {
fmt.Println("Git Media OID:", p.Name)
if createLinks {
p.CreateLink(p.Name)
}
}
}
func init() {
scanCmd.Flags().BoolVarP(&createLinks, "create-links", "l", false, "Create git media link files")
RootCmd.AddCommand(scanCmd)
}

@ -27,5 +27,3 @@ func TestLsFiles(t *testing.T) {
repo.GitCmd("commit", "-m", "hi")
})
}
// Go from git media oid to sha1