-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from Scalingo/fix/429/stack_improvements
Various improvements to stacks-set
- Loading branch information
Showing
3 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package autocomplete | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/Scalingo/cli/config" | ||
"github.com/urfave/cli" | ||
"gopkg.in/errgo.v1" | ||
) | ||
|
||
func StacksSetAutoComplete(c *cli.Context) error { | ||
client, err := config.ScalingoClient() | ||
if err != nil { | ||
return errgo.Notef(err, "fail to get Scalingo client") | ||
} | ||
|
||
stacks, err := client.StacksList() | ||
if err != nil { | ||
return nil | ||
} | ||
|
||
for _, stack := range stacks { | ||
fmt.Println(stack.ID) | ||
fmt.Println(stack.Name) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters