MCPcopy Index your code
hub / github.com/perkeep/perkeep / main

Function main

cmd/pk-devimport/devimport.go:156–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156func main() {
157 flag.Parse()
158 args := flag.Args()
159 if len(args) != 2 {
160 usage()
161 os.Exit(2)
162 }
163
164 if _, ok := importer.All()[args[0]]; !ok {
165 log.Fatalf("%v is not a valid importer name", args[0])
166 }
167 ref, ok := blob.Parse(args[1])
168 if !ok {
169 log.Fatalf("Not a valid blob ref: %q", args[1])
170 }
171
172 h, err := newImporterHost(*flagServer, args[0])
173 if err != nil {
174 log.Fatal(err)
175 }
176 if err := h.RunImporterAccount(args[0], ref); err != nil {
177 log.Fatal(err)
178 }
179}

Callers

nothing calls this directly

Calls 8

AllFunction · 0.92
ParseFunction · 0.92
newImporterHostFunction · 0.85
ParseMethod · 0.80
FatalMethod · 0.80
RunImporterAccountMethod · 0.80
usageFunction · 0.70
FatalfMethod · 0.65

Tested by

no test coverage detected