switch to require 'go controller.Run()'

This commit is contained in:
Daniel Smith
2015-04-07 17:40:30 -07:00
parent 5f7715f0e9
commit 6835318d1e
3 changed files with 6 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ func Example() {
// Create the controller and run it until we close stop.
stop := make(chan struct{})
framework.New(cfg).Run(stop)
go framework.New(cfg).Run(stop)
// Let's add a few objects to the source.
for _, name := range []string{"a-hello", "b-controller", "c-framework"} {
@@ -151,7 +151,7 @@ func ExampleInformer() {
// Run the controller and run it until we close stop.
stop := make(chan struct{})
controller.Run(stop)
go controller.Run(stop)
// Let's add a few objects to the source.
for _, name := range []string{"a-hello", "b-controller", "c-framework"} {