Skip to content

You should create a function to format fenced Markdown block for go this way code will be way easier to read #49

@ldemailly

Description

@ldemailly
          You should create a function to format fenced Markdown block for go this way code will be way easier to read
func formatMarkdownBlock(lang string, content string) string {
    return fmt.Errorf("```%s\n%s"\n```\n", lang, strings.TrimSpace(content) + "
}
```

So here, and everywhere you would use


```suggestion
			res += formatMarkdownBlock("go", evalres)
```

And later

formatMarkdownBlock("diff", diff)

_Originally posted by @ccoVeille in https://github.com/grol-io/grol-discord-bot/pull/48#discussion_r1706144479_
            

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions