Commit a2da3b6
authored
Fix Go telemetry examples: NewClient takes *ClientOptions and returns one value (#2086)
The Go OpenTelemetry example bound two return values and passed
ClientOptions by value, so copying it into a program failed to compile with
an assignment mismatch and a pointer type error.
NewClient is declared as `func NewClient(options *ClientOptions) *Client`:
it takes a pointer and returns no error. Errors surface later from Start
and CreateSession.
Correct the three duplicated copies of the snippet to the single-return
pointer form already used by NewClient's own doc comment.
Co-authored-by: examon <examon@users.noreply.github.com>1 parent 4f9bc8d commit a2da3b6
3 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2158 | 2158 | | |
2159 | 2159 | | |
2160 | 2160 | | |
2161 | | - | |
| 2161 | + | |
2162 | 2162 | | |
2163 | 2163 | | |
2164 | 2164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
| |||
0 commit comments