Skip to content

Commit

Permalink
chore: using indextation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Sep 29, 2023
1 parent 1c69515 commit a1148b5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"fmt"
"log"
"strings"

infoNode "github.com/allancapistrano/tangle-client-go/info"
"github.com/allancapistrano/tangle-client-go/messages"
Expand All @@ -24,13 +23,12 @@ func main() {
// messages.SubmitMessage(nodeURL, "LB_REPLY", "{asdfghjkl}", 15)

// Reading some messages by an index.
messagesByIndex, err := messages.GetAllMessagesByIndex(nodeURL, "LB_ENTRY_REPLY")
messagesByIndex, err := messages.GetAllMessagesByIndex(nodeURL, "REP_EVALUATION")
if err != nil {
log.Fatal(err)
}

for _, v := range messagesByIndex {
fmt.Println([]byte(strings.Trim(v.Content, "\t")))
fmt.Printf("Index: %s | Content: %s\n", v.Index, v.Content)
}

Expand Down

0 comments on commit a1148b5

Please sign in to comment.