From 38fd2fcd988b698dfe007a840271d2ffbd074aba Mon Sep 17 00:00:00 2001 From: matijamarjanovic Date: Thu, 19 Dec 2024 20:30:35 +0100 Subject: [PATCH] fix fmt --- .../gno.land/r/demo/btree_dao/btree_dao.gno | 27 ++++++++++--------- examples/gno.land/r/demo/btree_dao/gno.mod | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/gno.land/r/demo/btree_dao/btree_dao.gno b/examples/gno.land/r/demo/btree_dao/btree_dao.gno index c88a31a553d..c77400cd857 100644 --- a/examples/gno.land/r/demo/btree_dao/btree_dao.gno +++ b/examples/gno.land/r/demo/btree_dao/btree_dao.gno @@ -1,22 +1,23 @@ package btree_dao import ( + "errors" "std" "strings" "time" - "errors" + "gno.land/p/demo/btree" "gno.land/p/demo/grc/grc721" - "gno.land/p/moul/md" "gno.land/p/demo/ufmt" - + "gno.land/p/moul/md" ) + // RegistrationDetails holds the details of a user's registration type RegistrationDetails struct { - Address std.Address - RegTime time.Time - UserBTree *btree.BTree - NFTID int + Address std.Address + RegTime time.Time + UserBTree *btree.BTree + NFTID int } // Less implements the Record interface for RegistrationDetails @@ -27,7 +28,7 @@ func (rd *RegistrationDetails) Less(than btree.Record) bool { } var ( - dao = grc721.NewBasicNFT("BTree DAO", "BTDAO") + dao = grc721.NewBasicNFT("BTree DAO", "BTDAO") tokenID = 0 members = btree.New() ) @@ -126,9 +127,9 @@ func Render(path string) string { nftList += ", " } if regDetails.UserBTree == nil { - nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds + nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds } else { - nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters + nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters } } nftList += ")" @@ -153,9 +154,9 @@ func Render(path string) string { nftList += ", " } if regDetails.UserBTree == nil { - nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds + nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds } else { - nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters + nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters } } nftList += ")" @@ -168,7 +169,7 @@ func Render(path string) string { // Use the md package to format the output var sb strings.Builder - + sb.WriteString(md.H1("B-Tree DAO Members")) sb.WriteString(md.H2("Total NFTs Minted")) sb.WriteString(ufmt.Sprintf("Total NFTs minted: %d\n\n", dao.TokenCount())) diff --git a/examples/gno.land/r/demo/btree_dao/gno.mod b/examples/gno.land/r/demo/btree_dao/gno.mod index 45f18b43af0..25101b7b6d5 100644 --- a/examples/gno.land/r/demo/btree_dao/gno.mod +++ b/examples/gno.land/r/demo/btree_dao/gno.mod @@ -1,2 +1,2 @@ -module gno.land/r/matijamarjanovic/btree_dao +module gno.land/r/demo/btree_dao