doctor

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package doctor anaylzes notes for empty content, incorrect links and duplicates.

Index

Constants

View Source
const (
	Bold   = "\033[1m"
	Green  = "\033[32m"
	Red    = "\033[31m"
	Yellow = "\033[33m"
	Reset  = "\033[0m"
	Dim    = "\033[2m"
)

ANSI color codes for terminal output formatting.

Variables

This section is empty.

Functions

func PrintReport

func PrintReport(r Report)

PrintReport formats and prints the linter report to standard output. It colorizes the output, groups broken links and duplicate titles by file, and ensures consistent alphabetical sorting of the results.

Types

type BrokenLink struct {
	SourceFile string
	TargetNote string
}

type DuplicateTitle

type DuplicateTitle struct {
	Title string
	Paths []string
}

type Report

type Report struct {
	BrokenLinks []BrokenLink
	EmptyNotes  []string
	Duplicates  []DuplicateTitle
}

Report gathers all problems in one structure

func Run

func Run(notesPath string) (Report, error)

Run reads directory and checks for problems

Jump to

Keyboard shortcuts

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