func (c *Client) GetConfig(branchName string, appNames ...string) ([]map[string]interface{}, error) {
	v := c.BestAPIVersion()

	if v < 5 {
		settings, err := c.getConfigV4(branchName, appNames)
		return settings, errors.Trace(err)
	}

	callName := "CharmConfig"
	if v < 6 {
		callName = "GetConfig"
	}

	var callArg interface{}
	if v < 9 {
		arg := params.Entities{Entities: make([]params.Entity, len(appNames))}
		for i, appName := range appNames {
			arg.Entities[i] = params.Entity{Tag: names.NewApplicationTag(appName).String()}
		}
		callArg = arg
	} else {
		// Version 9 of the API introduces generational config.
		arg := params.ApplicationGetArgs{Args: make([]params.ApplicationGet, len(appNames))}
		for i, appName := range appNames {
			arg.Args[i] = params.ApplicationGet{ApplicationName: appName, BranchName: branchName}
		}
		callArg = arg
	}

	var results params.ApplicationGetConfigResults
	err := c.facade.FacadeCall(callName, callArg, &results)
	if err != nil {
		return nil, errors.Trace(err)
	}

	var settings []map[string]interface{}
	for i, result := range results.Results {
		if result.Error != nil {
			return nil, errors.Annotatef(err, "unable to get settings for %q", appNames[i])
		}
		settings = append(settings, result.Config)
	}
	return settings, nil
}
// GetConfig returns the charm configuration settings for each of the
// applications. If any of the applications are not found, an error is
// returned.
GetConfig returns the charm configuration settings for each of the
applications. If any of the applications are not found, an error is
returned.
// GetConfig returns the charm configuration settings for each of the // applications . If any of the applications are not found an error is // returned .
func (c *Client) GetConfig(branchName string, appNames ...string) ([]map[string]interface{}, error) {
	v := c.BestAPIVersion()
	if v < 5 {
		settings, err := c.getConfigV4(branchName, appNames)
		return settings, errors.Trace(err)
	}
	callName := "CharmConfig"
	if v < 6 {
		callName = "GetConfig"
	}
	var callArg interface{}
	if v < 9 {
		arg := params.Entities{Entities: make([]params.Entity, len(appNames))}
		for i, appName := range appNames {
			arg.Entities[i] = params.Entity{Tag: names.NewApplicationTag(appName).String()}
		}
		callArg = arg
	} else {
		arg := params.ApplicationGetArgs{Args: make([]params.ApplicationGet, len(appNames))}
		for i, appName := range appNames {
			arg.Args[i] = params.ApplicationGet{ApplicationName: appName, BranchName: branchName}
		}
		callArg = arg
	}
	var results params.ApplicationGetConfigResults
	err := c.facade.FacadeCall(callName, callArg, &results)
	if err != nil {
		return nil, errors.Trace(err)
	}
	var settings []map[string]interface{}
	for i, result := range results.Results {
		if result.Error != nil {
			return nil, errors.Annotatef(err, "unable to get settings for %q", appNames[i])
		}
		settings = append(settings, result.Config)
	}
	return settings, nil
}
func ( c * Client ) GetConfig ( branchName string , appNames ... string ) ( [ ] map [ string ] interface { } , error ) { v := c . BestAPIVersion ( ) if v < 5 { settings , err := c . getConfigV4 ( branchName , appNames ) return settings , errors . Trace ( err ) } callName := " " if v < 6 { callName = " " } var callArg interface { } if v < 9 { arg := params . Entities { Entities : make ( [ ] params . Entity , len ( appNames ) ) } for i , appName := range appNames { arg . Entities [ i ] = params . Entity { Tag : names . NewApplicationTag ( appName ) . String ( ) } } callArg = arg } else { arg := params . ApplicationGetArgs { Args : make ( [ ] params . ApplicationGet , len ( appNames ) ) } for i , appName := range appNames { arg . Args [ i ] = params . ApplicationGet { ApplicationName : appName , BranchName : branchName } } callArg = arg } var results params . ApplicationGetConfigResults err := c . facade . FacadeCall ( callName , callArg , & results ) if err != nil { return nil , errors . Trace ( err ) } var settings [ ] map [ string ] interface { } for i , result := range results . Results { if result . Error != nil { return nil , errors . Annotatef ( err , " " , appNames [ i ] ) } settings = append ( settings , result . Config ) } return settings , nil }
GetConfig returns the charm configuration settings for each of the
applications.
GetConfig returns the charm configuration settings for each of the applications .
// Version 9 of the API introduces generational config.