PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/cowsaydemo/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / cowsaydemo
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/x/daily/cowsaydemo/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • cowsaydemo.gnogno
cowsaydemo.gnogno
1// Package cowsaydemo is a small gnoweb demo of the cowsay renderer provided by2// the [p/moul/x/daily/cowsay](/p/moul/x/daily/cowsay/v0) library: it makes the3// ASCII cow say whatever you put in the path.4//5// It contains no rendering logic of its own — the art comes entirely from6// `cowsay.Say`.7package cowsaydemo89import (10	"strings"1112	"gno.land/p/moul/x/daily/cowsay/v0"13)1415// Render displays the cow for gnoweb.16//17//	Render("")             -> default message ("Moo!")18//	Render("/hello there") -> renders "hello there", word-wrapped19func Render(path string) string {20	msg := strings.TrimLeft(path, "/")21	art := cowsay.Say(msg)2223	var b strings.Builder24	b.WriteString("# cowsay\n\n")25	if strings.TrimSpace(msg) == "" {26		b.WriteString("_Tip: pass a message in the path, e.g._ `/Hello, gno.land!`\n\n")27	}28	b.WriteString("```\n")29	b.WriteString(art)30	b.WriteString("```\n")31	return b.String()32}33

Functions

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.