From 4eaa73a187b78cdd4b6d0b19594387bfa50ca11a Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Fri, 12 Aug 2022 03:29:17 -0400 Subject: [PATCH] chore: lint fixes (#2741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use os package * format Co-authored-by: Jerónimo Albi --- docs/docs.go | 1 + ignite/pkg/cosmosclient/cosmosclient.go | 8 +++++--- ignite/services/network/networkchain/prepare.go | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index f7e9b2c40b..479e61ef97 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3,5 +3,6 @@ package docs import "embed" // Docs are Ignite CLI docs. +// //go:embed *.md */*.md var Docs embed.FS diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 4e53d445b6..ec71a4d196 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -226,9 +226,11 @@ type Response struct { // e.g., for the following CreateChain func the type would be: `types.MsgCreateChainResponse`. // // ```proto -// service Msg { -// rpc CreateChain(MsgCreateChain) returns (MsgCreateChainResponse); -// } +// +// service Msg { +// rpc CreateChain(MsgCreateChain) returns (MsgCreateChainResponse); +// } +// // ``` func (r Response) Decode(message proto.Message) error { data, err := hex.DecodeString(r.Data) diff --git a/ignite/services/network/networkchain/prepare.go b/ignite/services/network/networkchain/prepare.go index 5b47056a4d..3b4284de76 100644 --- a/ignite/services/network/networkchain/prepare.go +++ b/ignite/services/network/networkchain/prepare.go @@ -3,7 +3,6 @@ package networkchain import ( "context" "fmt" - "io/ioutil" "os" "path/filepath" "strconv" @@ -251,7 +250,7 @@ func (c Chain) applyGenesisValidators(ctx context.Context, genesisVals []network // write gentxs for i, val := range genesisVals { gentxPath := filepath.Join(gentxDir, fmt.Sprintf("gentx%d.json", i)) - if err = ioutil.WriteFile(gentxPath, val.Gentx, 0o666); err != nil { + if err = os.WriteFile(gentxPath, val.Gentx, 0o666); err != nil { return err } }