func run(c *cli.Context) error { if c.String("env-file") != "" { _ = godotenv.Load(c.String("env-file")) } plugin := Plugin{ Key: c.String("access-key"), Secret: c.String("secret-key"), Bucket: c.String("bucket"), Region: c.String("region"), Source: c.String("source"), Target: c.String("target"), Delete: c.Bool("delete"), Access: c.Generic("access").(*StringMapFlag).Get(), CacheControl: c.Generic("cache-control").(*StringMapFlag).Get(), ContentType: c.Generic("content-type").(*StringMapFlag).Get(), ContentEncoding: c.Generic("content-encoding").(*StringMapFlag).Get(), Metadata: c.Generic("metadata").(*DeepStringMapFlag).Get(), Redirects: c.Generic("redirects").(*MapFlag).Get(), CloudFrontDistribution: c.String("cloudfront-distribution"), DryRun: c.Bool("dry-run"), } return plugin.Exec() }