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

v0 source pure

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

Readme View source

gno.land/p/moul/x/daily/cowsay/v0

cowsaySay(msg string) string returns the classic ASCII cow with a speech bubble containing msg.

Pure deterministic string art: the message is word-wrapped into a speech balloon (single line uses < >, multi-line uses / \ | | borders) with the happy cow stacked underneath. Port of cowsay by Tony Monroe (1999); no os/exec, no chain coupling.

1import "gno.land/p/moul/x/daily/cowsay/v0"
2
3art := cowsay.Say("Hello, gno.land!")  // bubble + cow, ready for a code block
4cowsay.Say("")                          // default message ("Moo!")

Live demo: r/moul/x/daily/cowsaydemo · render it at /r/moul/x/daily/cowsaydemo/v0.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package cowsay is an on-chain Gno port of the classic `cowsay` program: it builds an ASCII cow with a speech bubble containing a message — as a reusable pure package.

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

A live demo of this package (an interactive cow that says whatever you put in the path) is at r/moul/x/daily/cowsaydemo(/r/moul/x/daily/cowsaydemo/v0).

Functions 1

func Say

1func Say(msg string) string
source

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

Imports 1

  • strings stdlib

Source Files 3