MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / main

Function main

cmd/build-lambda-zip/main.go:23–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21`
22
23func main() {
24 var outputZip string
25 flag.StringVar(&outputZip, "o", "", "")
26 flag.StringVar(&outputZip, "output", "", "")
27 flag.Usage = func() {
28 fmt.Fprint(os.Stderr, usage)
29 }
30 flag.Parse()
31 if len(flag.Args()) == 0 {
32 log.Fatal("no input provided")
33 }
34 inputExe := flag.Arg(0)
35 if outputZip == "" {
36 outputZip = fmt.Sprintf("%s.zip", filepath.Base(inputExe))
37 }
38 if err := compressExeAndArgs(outputZip, inputExe, flag.Args()[1:]); err != nil {
39 log.Fatalf("failed to compress file: %v", err)
40 }
41 log.Printf("wrote %s", outputZip)
42}
43
44func writeExe(writer *zip.Writer, pathInZip string, data []byte) error {
45 if pathInZip != "bootstrap" {

Callers

nothing calls this directly

Calls 2

compressExeAndArgsFunction · 0.85
ParseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…