Skip to content

Commit

Permalink
Add instructions for how to use with Go modules (#431)
Browse files Browse the repository at this point in the history
* Add instructions on how to use with Go modules

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Added module info and rewrote some of the content.
  • Loading branch information
tamalsaha authored and jhendrixMSFT committed Jul 23, 2019
1 parent 051b144 commit 91963f3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,43 @@ go get github.com/Azure/go-autorest/autorest/date
go get github.com/Azure/go-autorest/autorest/to
```

### Using with Go Modules
In [v12.0.1](https://github.com/Azure/go-autorest/pull/386), this repository introduced the following modules.

- autorest/adal
- autorest/azure/auth
- autorest/azure/cli
- autorest/date
- autorest/mocks
- autorest/to
- autorest/validation
- autorest
- logger
- tracing

Tagging cumulative SDK releases as a whole (e.g. `v12.3.0`) is still enabled to support consumers of this repo that have not yet migrated to modules.

If you're using modules and your code directly and/or indirectly depends on previous versions of `go-autorest` (e.g. as a dependency from azure-sdk-for-go), and if you get an ambiguous import for any packages from `go-autorest` you might need to use a replacement to tell Go to use the latest version of the SDK from this repo.

```
module <your_module_here>
go 1.12
require (
github.com/Azure/azure-sdk-for-go v31.1.0+incompatible
github.com/Azure/go-autorest/autorest v0.5.0
...
)
replace (
github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.3.0+incompatible
...
)
```

Once azure-sdk-for-go has been converted to modules this replacement should no longer be necessary.

## License

See LICENSE file.
Expand Down

0 comments on commit 91963f3

Please sign in to comment.