func (c *networkCmd) doNetworkCreate(client *lxd.Client, name string, args []string) error { config := map[string]string{} for i := 0; i < len(args); i++ { entry := strings.SplitN(args[i], "=", 2) if len(entry) < 2 { return errArgs } config[entry[0]] = entry[1] } err := client.NetworkCreate(name, config) if err == nil { fmt.Printf(i18n.G("Network %s created")+"\n", name) } return err }