| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Command helloclient is the simplest possible client. It is mainly used in simple |
| _ "v.io/x/ref/runtime/factories/generic" |
| var name *string = flag.String("name", "", "Name of the hello server") |
| ctx, shutdown := v23.Init() |
| ctx, cancel := context.WithTimeout(ctx, 10*time.Second) |
| err := v23.GetClient(ctx).Call(ctx, *name, "Hello", nil, []interface{}{&result}) |
| panic(verror.DebugString(err)) |
| panic(fmt.Sprintf("Unexpected result. Wanted %q, got %q", "hello", result)) |