Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/KEINOS/go-md-spec-check/mdspec" ) func main() { // Sample Markdown-to-HTML conversion function that does not do its job. myMarkdownParser := func(markdown string) (string, error) { return "<p>Hello, World!</p>", nil } // Check if the `myMarkdownParser()` complies with the CommonMark specification // version 0.30. err := mdspec.SpecCheck("v0.30", myMarkdownParser) if err != nil { fmt.Println(err.Error()) } }
Output: error 1_Tabs: the given function did not return the expected HTML result. given markdown: "\tfoo\tbaz\t\tbim\n" expect HTML: "<pre><code>foo\tbaz\t\tbim\n</code></pre>\n" actual HTML: "<p>Hello, World!</p>"
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListVersion ¶
ListVersion returns a list of all available versions of the specification.
Example ¶
package main import ( "fmt" "log" "github.com/KEINOS/go-md-spec-check/mdspec" ) func main() { list, err := mdspec.ListVersion() if err != nil { log.Fatal(err) } for _, v := range list { fmt.Println(v) } }
Output: v0.30 v0.29 v0.28 v0.27 v0.26 v0.25 v0.24 v0.23 v0.22 v0.21 v0.20 v0.19 v0.18 v0.17 v0.16 v0.15 v0.14 v0.13
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.