resume

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package resume defines the imported-resume data model. Files live on disk under the resumes/ directory; this struct is what we track in resumes.json so the CLI can list, activate, and remove them by ID.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSnippet

func ExtractSnippet(path string, maxChars int) (string, error)

ExtractSnippet returns up to maxChars Unicode code points read from the resume at path. It supports only .txt and .md - other extensions return ("", nil) so callers can treat unsupported formats as a non-error.

The implementation is UTF-8 safe and never panics on binary input: invalid bytes are counted, a small number are tolerated, and beyond that an error is returned. The byte budget is hard-capped so a mis-named binary file cannot force a large read.

Types

type Resume

type Resume struct {
	ID         string    `json:"id"`
	Filename   string    `json:"filename"`
	Path       string    `json:"path"`
	SizeBytes  int64     `json:"size_bytes"`
	ImportedAt time.Time `json:"imported_at"`
	Active     bool      `json:"active,omitempty"`
	Notes      string    `json:"notes,omitempty"`
}

Resume is one imported resume artifact (PDF, DOCX, TXT, etc.). We keep only the metadata here; the actual bytes are at Path.

Jump to

Keyboard shortcuts

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