Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(720)

Side by Side Diff: cmd/juju/get.go

Issue 12546043: return error on no environment
Patch Set: return error on no environment Created 10 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cmd/juju/expose.go ('k') | cmd/juju/init.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012, 2013 Canonical Ltd. 1 // Copyright 2012, 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package main 4 package main
5 5
6 import ( 6 import (
7 "errors" 7 "errors"
8 8
9 "launchpad.net/gnuflag" 9 "launchpad.net/gnuflag"
10
10 "launchpad.net/juju-core/cmd" 11 "launchpad.net/juju-core/cmd"
11 "launchpad.net/juju-core/juju" 12 "launchpad.net/juju-core/juju"
12 "launchpad.net/juju-core/state/api/params" 13 "launchpad.net/juju-core/state/api/params"
13 "launchpad.net/juju-core/state/statecmd" 14 "launchpad.net/juju-core/state/statecmd"
14 ) 15 )
15 16
16 // GetCommand retrieves the configuration of a service. 17 // GetCommand retrieves the configuration of a service.
17 type GetCommand struct { 18 type GetCommand struct {
18 EnvCommandBase 19 EnvCommandBase
19 ServiceName string 20 ServiceName string
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return err 64 return err
64 } 65 }
65 66
66 resultsMap := map[string]interface{}{ 67 resultsMap := map[string]interface{}{
67 "service": results.Service, 68 "service": results.Service,
68 "charm": results.Charm, 69 "charm": results.Charm,
69 "settings": results.Config, 70 "settings": results.Config,
70 } 71 }
71 return c.out.Write(ctx, resultsMap) 72 return c.out.Write(ctx, resultsMap)
72 } 73 }
OLDNEW
« no previous file with comments | « cmd/juju/expose.go ('k') | cmd/juju/init.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b