Skip to content

Commit

Permalink
Merge pull request multiformats#18 from libp2p/readme/gomod
Browse files Browse the repository at this point in the history
replace gx instructions with note about gomod
  • Loading branch information
yusefnapora committed Apr 11, 2019
2 parents adf56ab + 3117e4e commit c34f15d
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,13 @@ Note: This package largely replaces the functionality of [go-libp2p-conn](https:
go get github.com/libp2p/go-libp2p-transport-upgrader
```

Note that `go-libp2p-transport-upgrader` is packaged with Gx, so it is recommended to use Gx to install and use it (see the Usage section).
This repo is [gomod](https://github.com/golang/go/wiki/Modules)-compatible, and users of
go 1.11 and later with modules enabled will automatically pull the latest tagged release
by referencing this package. Upgrades to future releases can be managed using `go get`,
or by editing your `go.mod` file as [described by the gomod documentation](https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies).

## Usage

This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project it is recommended that you:

```sh
go get -u github.com/whyrusleeping/gx
go get -u github.com/whyrusleeping/gx-go
cd <your-project-repository>
gx init
gx import github.com/libp2p/go-libp2p-transport-upgrader
gx install --global
gx-go --rewrite
```

Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information.

## Example

Below is a simplified TCP transport implementation using the transport upgrader. In practice, you'll want to use [go-tcp-transport](https://github.com/libp2p/go-tcp-transport) (which has reuseport support).
Expand Down

0 comments on commit c34f15d

Please sign in to comment.