(opts *ListOptions)
| 43 | } |
| 44 | |
| 45 | func listRun(opts *ListOptions) error { |
| 46 | cfg, err := opts.Config() |
| 47 | if err != nil { |
| 48 | return err |
| 49 | } |
| 50 | |
| 51 | var host string |
| 52 | if opts.Hostname != "" { |
| 53 | host = opts.Hostname |
| 54 | } else { |
| 55 | host, _ = cfg.Authentication().DefaultHost() |
| 56 | } |
| 57 | |
| 58 | for _, option := range config.Options { |
| 59 | fmt.Fprintf(opts.IO.Out, "%s=%s\n", option.Key, option.CurrentValue(cfg, host)) |
| 60 | } |
| 61 | |
| 62 | return nil |
| 63 | } |