Skip to content

Commit

Permalink
refactor: not necessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Nov 5, 2023
1 parent 4771a55 commit 0117c9b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app/viewer/views/eventview/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,13 @@ func (t *EventView) GenerateRecords() error {
return err
}

// logus.Debug("rendered events", logus.DiscordMessageID(t.main.MessageID)) // TODO delete as u finished refactor

eventTags, err := t.GetAPI().Players.Events.TagsList(t.GetAPI().ChannelID)
logus.CheckWarn(err, "failed to acquire player event list", logus.ChannelID(t.GetAPI().ChannelID))

if len(eventTags) > 0 {
var beginning strings.Builder
var end strings.Builder

// Looks like identical :thinking: // TODO delete as u finished refactor
// sb.WriteString(fmt.Sprintf("**%s** %s\n", t.main.ViewID, time.Now().String()))

beginning.WriteString("**Event table of players**\n")
beginning.WriteString("```json\n")
t.main.ViewBeginning = types.ViewBeginning(beginning.String())
Expand All @@ -67,7 +62,7 @@ func (t *EventView) GenerateRecords() error {
}
result, err := json.Marshal(matchedPlayers)
logus.CheckError(err, "failed to marshal event matched players")
record.WriteString(fmt.Sprintf("%s", string(result)))
record.WriteString(string(result))

record.WriteString("\n")
t.main.AppendRecord(types.ViewRecord(record.String()))
Expand Down

0 comments on commit 0117c9b

Please sign in to comment.