You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/go/index.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ All of Segment's server-side libraries are built for high-performance, so you ca
18
18
Install `analytics-go` using `go get`:
19
19
20
20
```bash
21
-
go get gopkg.in/segmentio/analytics-go.v3
21
+
go get github.com/segmentio/analytics-go/v3
22
22
```
23
23
24
24
Then import it and initialize an instance with your source's **Write Key**. Of course, you'll want to replace `YOUR_WRITE_KEY` with your actual **Write Key** which you can find in Segment under your source settings.
25
25
26
26
```go
27
27
package main
28
28
29
-
import"gopkg.in/segmentio/analytics-go.v3"
29
+
import"github.com/segmentio/analytics-go/v3"
30
30
31
31
funcmain() {
32
32
client:= analytics.New("YOUR_WRITE_KEY")
@@ -414,8 +414,6 @@ for example, with [govendor](https://github.com/kardianos/govendor){:target="_bl
Alternatively, you can also use [`gopkg.in`](http://labix.org/gopkg.in){:target="_blank”}. First run `go get gopkg.in/segmentio/analytics-go.v3` and replace your imports with `import "gopkg.in/segmentio/analytics-go.v3"`.
418
-
419
417
To help with migrating your code, Segment recommends checking out a simple example that is written in [v2](https://github.com/segmentio/analytics-go/blob/v2.0/examples/track.go) and [v3](https://github.com/segmentio/analytics-go/blob/v3.0/examples/track.go) so you can easily see the differences.
420
418
421
419
The first difference you'll notice is that `Client` is now an interface. It has a single method - `Enqueue` that can accept messages of all types.
0 commit comments