internal

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "0.1.0"
)

Functions

func FileExists

func FileExists(item, filename, dir string) (bool, error)

FileExists checks if a file already exists in the directory.

func OpenNote

func OpenNote(note *Note)

OpenNote opens a note in a special terminal editor.

func UnmarshalNote

func UnmarshalNote(n *Note, fp string) error

UnmarshalNote parses the data in the specified file path and stores the result in the Note pointed to by n.

Types

type Author

type Author struct {
	ID, Name string
	Notes    []string
}

func NewAuthor

func NewAuthor() (Author, error)

NewAuthor creates and returns a new author. It returns an error if any.

type Note

type Note struct {
	ID, AuthorName, Title, Body string
}

func NewNote

func NewNote(id, authorName string) Note

NewNote creates and returns a new note.

func (*Note) TruncatedBody

func (n *Note) TruncatedBody(length int) string

TruncatedBody truncates the note's body to a given length and returns it.

type Tag

type Tag struct {
	Name string
}

func NewTag

func NewTag() (Tag, error)

NewTag creates and returns a new tag. It returns an error if any.

Jump to

Keyboard shortcuts

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