render_example_test.gno
1.06 Kb · 26 lines
1package semverdemo
2
3// ExampleRender pins the realm's Render output as a gno testable example.
4func ExampleRender() {
5 print(Render(""))
6 // Output:
7 // # semver — Semantic Versioning on-chain
8 //
9 // Demo of the [`p/moul/x/daily/semver`](/p/nym-moultest123/x/daily/semver/v0) library — a port of `golang.org/x/mod/semver`. Parse `vMAJOR.MINOR.PATCH[-prerelease][+build]` and compare with SemVer 2.0.0 precedence.
10 //
11 // ## Examples
12 //
13 // | a | rel | b | note |
14 // |---|:---:|---|---|
15 // | `1.2.3` | < | `1.2.10` | numeric patch, not lexical |
16 // | `1.0.0-alpha` | < | `1.0.0` | pre-release < release |
17 // | `1.0.0-alpha.1` | < | `1.0.0-alpha.beta` | numeric id < alphanumeric id |
18 // | `1.0.0-rc.1` | < | `1.0.0` | release candidate < final |
19 // | `2.0.0` | = | `2.0.0+build.5` | build metadata ignored |
20 //
21 // ## Try it
22 //
23 // - Compare two versions: [`/1.2.3/1.2.10`](/r/nym-moultest123/x/daily/semverdemo/v0:1.2.3/1.2.10)
24 // - Submitted list: [`/sorted`](/r/nym-moultest123/x/daily/semverdemo/v0:sorted)
25 // - Submit on-chain: `Submit("v1.4.2")`
26}