MCPcopy Create free account
hub / github.com/nikivdev/go / detectCopySourceStage

Function detectCopySourceStage

try/dockerlayers/main.go:463–475  ·  view source on GitHub ↗
(args string)

Source from the content-addressed store, hash-verified

461}
462
463func detectCopySourceStage(args string) string {
464 tokens := strings.Fields(args)
465 for i := 0; i < len(tokens); i++ {
466 token := tokens[i]
467 if strings.HasPrefix(token, "--from=") {
468 return strings.TrimPrefix(token, "--from=")
469 }
470 if token == "--from" && i+1 < len(tokens) {
471 return tokens[i+1]
472 }
473 }
474 return ""
475}
476
477func printReport(w io.Writer, rep *report) {
478 fmt.Fprintf(w, "Dockerfile insight for %s\n\n", rep.FilePath)

Callers 1

copyNotesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected