notes

package
v0.0.0-...-eef6dab Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootDir  = ".codenotes"
	NotesDir = "notes"
)

Variables

View Source
var (
	ErrProjectNotFound       = errors.New("project not found")
	ErrDirectoryDoesNotExist = errors.New("directory does not exist")
)

Functions

func AddNote

func AddNote(nc *noteConfig) (string, error)

AddNote adds notes to the repo

func GetProject

func GetProject() (string, error)

GetProject get the closest codenotes projects. can be used in subdirectories

func InitializeProject

func InitializeProject(directory string) (string, error)

InitializeProject creates the required directories necessary for a codenotes project

func NewNoteConfig

func NewNoteConfig(message string, path string, options ...noteConfigOption) (*noteConfig, error)

func WithIsSticky

func WithIsSticky(isSticky bool) noteConfigOption

func WithLineNo

func WithLineNo(lineNo int) noteConfigOption

Types

type InitConfig

type InitConfig struct {
	Directory string
}

Jump to

Keyboard shortcuts

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