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

Latest commit

 

History

History
48 lines (33 loc) · 1.47 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.47 KB

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"
)