~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/storage/list.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
        if err != nil {
86
86
                return err
87
87
        }
88
 
        if output == nil {
 
88
        if output == nil && c.out.Name() == "tabular" {
 
89
                ctx.Infof("No storage to display.")
89
90
                return nil
90
91
        }
91
92
        return c.out.Write(ctx, output)
123
124
}
124
125
 
125
126
func formatListTabular(writer io.Writer, value interface{}) error {
126
 
 
127
 
        switch value.(type) {
 
127
        switch value := value.(type) {
128
128
        case map[string]StorageInfo:
129
129
                return formatStorageListTabular(writer, value)
130
130