Skip to content

v2: Export a slice of clouds config opts #2913

@vooon

Description

@vooon

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions