envions/configstore: Storage.List()

Add the List() method to the Storage interface. List lists all
the existing environments in storage.
True. Done.

> In environs/configstore/disk.go:
>
> > @@ -95,6 +96,25 @@ func (d *diskStore) CreateInfo(envName string) (EnvironInfo, error) {
> >  	}, nil
> >  }
> >
> > +var jenvFilename = regexp.MustCompile(`^.+\.jenv$`)
> > +
> > +// List implements Storage.List
> > +func (d *diskStore) List() ([]string, error) {
> > +	path := filepath.Join(d.dir, "environments")
> > +	var envs []string
> > +	files, err := filepath.Glob(path + "/*.jenv")
> > +	if err != nil {
> > +		return nil, err
> > +	}
> > +	for _, file := range files {
> > +		fName := filepath.Base(file)
> > +		extName := filepath.Ext(file)
>
> Given that we globbed for .jenv, cannot we just put ".jenv" into a 
> constant string, and use the len of that to chop off the end?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/juju/juju/pull/35/files#r13575614>.
>