strangelove-ventures / lens-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lens-examples

Helpful info to implement Lens into your projects

Example Implementations:


Go.mod Setup

Note: This is only necessary if you are importing Lens into your project. These steps have already been taken in the above examples.

Because Lens replaces some modules in its mod file, manual steps are needed to properly import Lens into a project.

First, install lens to your GOPATH/pkg/mod directory. Run:

go install github.com/strangelove-ventures/lens@latest

Add the following lines to your mod file:

require github.com/gogo/protobuf v1.3.3
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4

Tidy your mod file. Run:

go mod tidy

Now you can properly import lens to your go file:

import (
	lens "github.com/strangelove-ventures/lens/client"
	registry "github.com/strangelove-ventures/lens/client/chain_registry"
)

About


Languages

Language:Go 100.0%