utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDateTime

func ParseDateTime(s string) (_time.Time, error)

func ParseDuration

func ParseDuration(s string) (_time.Duration, error)

Only supports minutes, hours, and days

func Pluralize

func Pluralize(count int64, singular string) string

func Relative

func Relative(seconds int64) string

Types

type Body added in v0.2.0

type Body struct {
	Oultines []*Outline `xml:"outline"`
}
type Head struct {
	Title string `xml:"title,omitempty"`
}

type InternalError

type InternalError struct {
	Message string
}

func NewInternalError

func NewInternalError(message string) *InternalError

func (*InternalError) Error

func (e *InternalError) Error() string

type OPML added in v0.2.0

type OPML struct {
	XMLName xml.Name `xml:"opml"`
	Version string   `xml:"version,attr"`
	Head    Head     `xml:"head"`
	Body    Body     `xml:"body"`
}

type Outline added in v0.2.0

type Outline struct {
	Outlines []*Outline `xml:"outline"`
	XMLURL   string     `xml:"xmlUrl,attr,omitempty"`
}

type Time

type Time interface {
	Now() _time.Time
}

func NewTime

func NewTime() Time

Jump to

Keyboard shortcuts

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