Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

Add instructions for how to use with Go modules #431

Merged
merged 6 commits into from
Jul 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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