2021-05-24 00:11:57 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
goflags "github.com/jessevdk/go-flags"
|
2021-05-24 00:11:58 +03:00
|
|
|
"github.com/motiejus/code/undocker/internal/cmdrootfs"
|
2021-05-24 00:11:57 +03:00
|
|
|
)
|
|
|
|
|
2021-05-24 00:11:57 +03:00
|
|
|
type (
|
|
|
|
params struct {
|
2021-05-24 00:11:58 +03:00
|
|
|
RootFS cmdrootfs.CmdRootFS `command:"rootfs" description:"Unpack a docker container image to a single filesystem tarball"`
|
|
|
|
Manifest cmdManifest `command:"manifest"`
|
2021-05-24 00:11:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
cmdManifest struct{} // stub
|
|
|
|
)
|
2021-05-24 00:11:57 +03:00
|
|
|
|
|
|
|
func main() {
|
|
|
|
if err := run(os.Args); err != nil {
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
os.Exit(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
func run(args []string) error {
|
2021-05-24 00:11:57 +03:00
|
|
|
var opts params
|
|
|
|
if _, err := goflags.ParseArgs(&opts, args[1:]); err != nil {
|
2021-05-24 00:11:57 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|