lyrics

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT-0 Imports: 5 Imported by: 0

Documentation

Overview

Package lyrics implements the Lyrics structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lyrics

type Lyrics struct {
	Times []time.Duration
	Lines []string
}

Lyrics holds lyrics.

func ForFile added in v0.7.0

func ForFile(file string) *Lyrics

ForFile returns Lyrics the file in disk.

func (*Lyrics) Search

func (l *Lyrics) Search(x time.Duration) int

Search return the first index greater with time than x. The return value minus one is the last index less than or equal to x.

The lyrics must be sorted by time.

func (*Lyrics) Sort added in v0.7.0

func (l *Lyrics) Sort()

Sort sorts lines in ascending order.

Jump to

Keyboard shortcuts

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