Skip to content

Commit 960b6f6

Browse files
author
Michael Ng
authored
chore(readme): Add instructions for version pinning. (#97)
1 parent ae6d34e commit 960b6f6

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,30 @@ cd $GOPATH/src/github.com/optimizely/go-sdk
8686
go install
8787
```
8888

89+
NOTE:
90+
We practice trunk-based development, and as such our default branch, `master` might not always be the most stable. We do tag releases on Github and you can pin your installation to those particular release versions. One way to do this is to use [*Go Modules*](https://blog.golang.org/using-go-modules) for managing external dependencies:
91+
92+
```
93+
module mymodule
94+
95+
go 1.12
96+
97+
require (
98+
github.com/optimizely/go-sdk v0.1.0
99+
)
100+
```
101+
102+
If you are already using `go.mod` in your application you can run the following:
103+
104+
```
105+
go mod edit -require github.com/optimizely/[email protected]
106+
```
107+
89108
NOTE:
90109
```$sh
91110
go get github.com/optimizely/go-sdk/...
92111
```
93-
or
112+
or
94113
```$sh
95114
go get github.com/optimizely/go-sdk/optimizely
96115
```

0 commit comments

Comments
 (0)