Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

cowsay package

Overview

Package cowsay is an on-chain Gno port of the classic `cowsay` program: it prints an ASCII cow with a speech bubble containing a message.

Original: cowsay by Tony Monroe (1999), a Perl program later ported to Go many times. This realm reimplements the core rendering — bubble framing, word-wrapping and the cow art — as pure, deterministic string logic.

Functions

Render

func Render(path string) string

Render displays the cow for gnoweb.

Example
1Render("")            -> default message ("Moo!")
2Render("/hello there") -> renders "hello there", word-wrapped

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/cowsay.Render()"

Result

Say

func Say(msg string) string

Say returns the full cowsay art (speech bubble + cow) for msg. An empty msg falls back to the default message.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/cowsay.Say()"

Result