code: func main() {
  	flag.Parse()
  	if len(flag.Args()) == 0 {
  		panic(fmt.Errorf("arch is required"))
  	}
  
  	for _, arch := range flag.Args() {
  		wd, err := os.Getwd()
  		if err != nil {
  			panic(err)
  		}
  		f, err := os.Open(filepath.Join(wd, arch))
  		if err != nil {
  			panic(err)
  		}
  		defer f.Close()
  		buf := &bytes.Buffer{}
  
  		gz, err := gzip.NewWriterLevel(newHexStringWriter(buf), gzip.BestCompression)
  		if err != nil {
  			panic(err)
  		}
  		if _, err = io.Copy(gz, f); err != nil {
  			panic(err)
  		}
  		if err := gz.Close(); err != nil {
  			panic(err)
  		}
  
  		fn := filepath.Join(wd, arch+"_binary.go")
  		dest, err := os.OpenFile(fn, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
  		if err != nil {
  			panic(err)
  		}
  		if err := tmpl.Execute(dest, struct{ Arch, Package, Data string }{Arch: arch, Package: "binfmt_misc", Data: buf.String()}); err != nil {
  			panic(err)
  		}
  		dest.Close()
  	}
  
  }
docs: // saves baseimage binaries statically into go code