poetry

package
v0.0.0-...-9d0d9e6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2015 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line string

Create some types of our own

type Poem

type Poem []Stanza

func LoadPoem

func LoadPoem(filename string) (Poem, error)

Load a poem from a file

func NewPoem

func NewPoem() Poem

Create an empty poem

func (Poem) NumLines

func (p Poem) NumLines() (count int)

Get the number of lines in a Poem

func (Poem) NumStanzas

func (p Poem) NumStanzas() int

Get the number of Stanzas in a poem

func (Poem) Stats

func (p Poem) Stats() (numVowels, numConsonants, numPuncs int)

Get the count of vowels and consonants from the poem

func (Poem) String

func (p Poem) String() string

set String() for poem to make it implement Stringer interface

type Stanza

type Stanza []Line

func (Stanza) NumLines

func (s Stanza) NumLines() int

Get the number of line in a Stanza

func (Stanza) String

func (s Stanza) String() string

Set String() for Stanza to make it implement Stringer interface

Jump to

Keyboard shortcuts

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