Now it's impossible to make a code like that:
func connect(cfg *Config) {
opts := []cloudOpts{clouds.WithCloud(cfg.Cloud)}
if cfg.CloudsFile != "" {
opts = append(opts, clouds.WithLocations(cfg.CloudsFile))
}
ao, eo, tlsCfg, err := clouds.Parse(opts...)
...
}
So it's hard to provide optional parts to a parser.
https://github.com/gophercloud/gophercloud/blob/master/openstack/config/clouds/options.go