banner

package
v2.468.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package banner generates ASCII picture of the Berty logo with a message.

       /\
  /\  / /\  ______         Lorem ipsum dolor sit amet, consectetur
 / /\/ /  \/  |   \        adipiscing elit, sed do eiusmod tempor
| |  \/   | ()|    |   incididunt ut labore et dolore magna aliqua.
 \ \      |   |____|     Ut enim ad minim veniam, quis nostrud [...]
  \ \      \____/ __           __
   \/       /    / /  ___ ____/ /___ __
   /     __/    / _ \/ -_) __/ __/ // /
  /_____/      /____/\__/_/  \__/\__ /
 /__/                           /___/

Index

Examples

Constants

View Source

Variables

This section is empty.

Functions

func OfTheDay

func OfTheDay() string

OfTheDay returns the ascii-art representation of the Berty bird saying the quote of the day

Example
Output:

func Say

func Say(message string) string

Say returns an ascii-art representation of the Berty bird saying something

Example
Output:

          /\
     /\  / /\  ______
    / /\/ /  \/  |   \                     hello world!
   | |  \/   | ()|    |
    \ \      |   |____|
     \ \      \____/ __           __
      \/       /    / /  ___ ____/ /___ __
      /     __/    / _ \/ -_) __/ __/ // /
     /_____/      /____/\__/_/  \__/\__ /
    /__/                           /___/
Example (Long)
Output:

          /\
     /\  / /\  ______         Lorem ipsum dolor sit amet, consectetur
    / /\/ /  \/  |   \        adipiscing elit, sed do eiusmod tempor
   | |  \/   | ()|    |   incididunt ut labore et dolore magna aliqua.
    \ \      |   |____|     Ut enim ad minim veniam, quis nostrud [...]
     \ \      \____/ __           __
      \/       /    / /  ___ ____/ /___ __
      /     __/    / _ \/ -_) __/ __/ // /
     /_____/      /____/\__/_/  \__/\__ /
    /__/                           /___/

Types

type Quote

type Quote struct {
	Author string
	Text   string
}

Quote is a data type that stores the text of the quote and its author

func QOTD

func QOTD() Quote

QOTD returns the quote of the day for display in banners or other graphics. This is calculated by using the number of days (24 hr periods) since a fixed time as the seed for a random number generator. This will result in the same quote being returned during a 24 hr period even after subsequent calls. UTC time is used by default if local time is not available.

BUG: The Go language cannot get local the local time on Android and iOS. This is a confirmed upstream issue, so mobile will always default to UTC.

func RandomQuote

func RandomQuote() Quote

RandomQuote returns a random quote from the quote list. For the quote of the day, use the function QOTD instead.

func (Quote) String

func (q Quote) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL