(ctx context.Context)
| 43 | } |
| 44 | |
| 45 | func printFarewell(ctx context.Context) error { |
| 46 | farewell, err := genFarewell(ctx) |
| 47 | if err != nil { |
| 48 | return err |
| 49 | } |
| 50 | fmt.Printf("%s world!\n", farewell) |
| 51 | return nil |
| 52 | |
| 53 | } |
| 54 | |
| 55 | func genGreeting(ctx context.Context) (string, error) { |
| 56 | ctx, cancel := context.WithTimeout(ctx, 1*time.Second) |