// runSetZone invokes the REST API with POST action and key prefix as // path. The specified configuration file is read from disk and sent // as the POST body. func runSetZone(cmd *cobra.Command, args []string) { if len(args) != 2 { cmd.Usage() return } server.RunSetZone(Context, args[0], args[1]) }
// runSetZone invokes the REST API with POST action and key prefix as // path. The specified configuration file is read from disk and sent // as the POST body. func runSetZone(cmd *cobra.Command, args []string) { if len(args) != 2 { cmd.Usage() return } // Read in the config file. body, err := ioutil.ReadFile(args[1]) if err != nil { log.Errorf("unable to read zone config file %q: %s", args[1], err) return } server.RunSetZone(Context, args[0], body) }