Skip to content

Commit ce51c30

Browse files
author
Matthew Fisher
committed
ref(cmd): use api.NewRoutable() to instantiate Routable field
1 parent 212c95a commit ce51c30

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

cmd/routing.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RoutingInfo(appID string) error {
1919
return err
2020
}
2121

22-
if config.Routable {
22+
if *config.Routable {
2323
fmt.Println("Routing is enabled.")
2424
} else {
2525
fmt.Println("Routing is disabled.")
@@ -38,7 +38,8 @@ func RoutingEnable(appID string) error {
3838
fmt.Printf("Enabling routing for %s... ", appID)
3939

4040
quit := progress()
41-
_, err = config.Set(s.Client, appID, api.Config{Routable: true})
41+
configObj := api.Config{Routable: api.NewRoutable()}
42+
_, err = config.Set(s.Client, appID, configObj)
4243

4344
quit <- true
4445
<-quit
@@ -62,7 +63,9 @@ func RoutingDisable(appID string) error {
6263
fmt.Printf("Disabling routing for %s... ", appID)
6364

6465
quit := progress()
65-
_, err = config.Set(s.Client, appID, api.Config{Routable: false})
66+
configObj := api.Config{Routable: api.NewRoutable()}
67+
*configObj.Routable = false
68+
_, err = config.Set(s.Client, appID, configObj)
6669

6770
quit <- true
6871
<-quit

glide.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ import:
1616
- package: github.com/olekukonko/tablewriter
1717
- package: github.com/arschles/assert
1818
- package: github.com/deis/controller-sdk-go
19-
version: b5c341604961fcf0ec326ca403b720e1aa6ff527
19+
version: d71c8ccf0e9076da84644ce31f359dfedc88c3f3

0 commit comments

Comments
 (0)