This document is a compact map of Go files and their functions. It is intended for orientation, not exhaustive API documentation.
CLI to list/add/remove users in the auth file.
main,usage: entrypoint and usage textlistUsers,addUser,removeUser: subcommand handlersauthFilePath: resolves auth file path from envpromptPassword,promptYesNo: interactive promptsuserExists,readAuthFile,writeAuthFile,upsertAuthFile: auth file I/O
Main entrypoint for the gwiki web server CLI.
main: loads config, wires index + server, starts listenerparseLogLevel: maps env string toslog.LevelselectLogWriter: picks log output (file or stderr)
Authentication helpers and password verification.
HashPassword: hashes a plaintext password with Argon2idParseArgon2idHash: parses an$argon2id$...hash string into paramsVerify: verifies a plaintext password against a stored hashLoadFile: loads and parses the auth file into a user map
API keys are loaded from WIKI_DATA_PATH/api-keys.txt on startup. Each line is:
alias:key:expiry
aliasbecomes the API user name.keyis the secret used inX-API-KeyorAuthorization: Bearer ....expiryisYYYY-MM-DD(invalid format stops startup).
Creates or updates a note (same behavior as POST /notes/{path}/save).
JSON body:
{
"path": "owner/folder/note.md",
"content": "# Title\nBody",
"frontmatter": "---\n---",
"visibility": "public",
"folder": "folder",
"priority": 5,
"owner": "owner",
"rename_decision": "cancel"
}
Example curl:
curl -sS -X POST http://localhost:8080/api/notes \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_KEY' \
-d '{
"path": "seno/notes/api-demo.md",
"content": "# API Demo\nSaved via API"
}'
User access is discovered by scanning .access.txt files under WIKI_REPO_PATH/<owner>/notes/**.
- The first non-empty, non-comment line can be folder visibility:
public,protected,private, orinherited. - Remaining lines are
user:accesswith accessroorrw. - Folder visibility
inheritedresolves from the nearest parent folder. - Root folder default visibility is
private; non-root default isinherited. - File frontmatter visibility defaults to
inherited; inherited files use resolved folder visibility. - File visibility values other than
inheritedoverride folder visibility. protectedmeans all authenticated users can read; write still requires owner/rw grant.
Access rules are stored in path_access/path_access_files, and file_access is precomputed during indexing for fast read filters (no path LIKE). Writes check the effective path rule for the specific note path.
DB tables (defined in internal/index/schema.go):
path_access_files(id, owner_user_id, path, depth, visibility)— one row per.access.txtfilepath_access(id, owner_user_id, access_file_id, grantee_user_id, access)— per-user grantsfile_access(id, file_id, grantee_user_id, access, source)— precomputed per-file effective access
Quick launcher entries are generated server-side and rendered immediately on page load (no network on open). When the user types, the client calls GET /quick/launcher?q=...&uri=... to fetch a unified list ordered as actions → tags → folders → notes. Actions are also filtered by the query, and the visible list is capped to 10 items (with a “+N more…” indicator).
Default actions render immediately when the launcher opens; context actions (e.g., Sync/Settings/Search/Broken/Scroll-to-top) appear once the query is non-empty. Context actions are injected directly below the default actions and can be further restricted later using the uri parameter (pattern matching on the current page). FTS note results only appear when the query length is 3+ characters.
Current action behavior by page context:
- Default actions (any page): New note, Home, Todo, Logout (when auth enabled).
- Unauthenticated: Login is the only visible action (Create note is hidden but kept for the launcher UI).
- Note view (
/notes/{path}only): Edit and Delete appear as default actions when the user is authenticated. - Note edit (
/notes/{path}/edit) and other blocked note routes (/preview,/save,/wikilink,/detail,/card,/collapsed,/backlinks): Edit/Delete are not shown. - Context actions (query length ≥ 1): Search, Sync, Settings, Broken links, Scroll to top. These are added just below default actions. Note results appear at 3+ characters.
Tag and folder results toggle filters on the current page by mutating only the t or f query params while preserving other params. Notes are searched via FTS (Index.Search) after 3+ characters. The JOURNAL tag is injected into results when it matches the query.
Key pieces:
internal/web/handlers.go:quickLauncherEntries,handleQuickLauncher, and URL toggle helpers.templates/quick_launcher_entries.html: shared rendering fragment.templates/base.html: quick launcher UI + HTMX wiring (passesuri, enforces 10-item cap).templates/quick_launcher.html: quick launcher markup.
The note edit launcher is a lightweight quick action menu scoped to the edit textarea. It is opened with Ctrl+Space while focused in the textarea and is independent of the global quick launcher.
Template split:
templates/edit.html: shared edit page shell, non-textarea fields, and non-textarea scripts.templates/note-edit-basic.html: basic textarea implementation (note_edit_basic+note_edit_basic_assets) and textarea-related scripts.
Behavior:
- Default actions (no network): Todo, Date, Time.
- Dynamic actions (query ≥ 1): tags plus date shortcuts (Tomorrow, Next week, Next month).
- FTS notes (query ≥ 3): note matches returned by the index.
- Selecting a tag inserts
#tagat the cursor. Selecting a note inserts[[note-path]]. - The list is capped to 10 visible items to avoid overflow.
Key pieces:
internal/web/handlers.go:handleQuickEditActions,quickEditActionsEntries.internal/web/server.go:/quick/edit-actionsroute.templates/edit.html: mounts the textarea mode via{{template "note_edit_basic" .}}and{{template "note_edit_basic_assets" .}}.templates/note-edit-basic.html: textarea UI + command expansion + edit launcher wiring.templates/note-edit-actions.html: edit launcher UI.templates/note_edit_actions_entries.html: dynamic entries (tags, actions, notes).
The edit textarea supports shorthand commands expanded on space. These are configurable per user via Settings and stored in config.json.
Config keys and defaults:
edit-command-trigger(!): prefix for all commands.edit-command-todo(!): trigger + token inserts- [ ].edit-command-today(d): trigger + token inserts today’s date.edit-command-date-base(d): trigger + token + number inserts date offset (supports+N,-N, orN).edit-command-time(t): trigger + token inserts current time (HH:mm:ss).
Implementation notes:
- Values are single characters and validated in
handleSettingsSaveviavalidEditCommandToken. - The edit page passes settings as
data-cmd-*attributes on the textarea; JS intemplates/note-edit-basic.htmlbuilds the command strings from these values.
Home/index note feed is grouped into time/priority sections and rendered as collapsible blocks.
Current section order:
- Important (
priority <= 5) - Today
- Planned (future updates)
- This Week
- This Month
- This Year
- Last Year
- Others
Notes are assigned to exactly one section by section_rank in Index.NoteList (home mode), then sorted by priority ASC, updated_at DESC inside each section.
UI behavior:
- Section headers show
(<n> notes)and are collapsible (<details>/<summary>). - No extra icon/glyph is added for the collapsible UI.
Todayheader is always shown (including0 notes).- Other sections are hidden when empty.
- Headers are rendered only on the first home chunk (
offset=0) so they do not repeat on paging.
Key pieces:
internal/index/index.go:NoteListhome section ranking.internal/web/handlers.go:loadHomeNotes,splitHomeSections, home/page handlers.templates/home_notes.html: section headers + collapsible rendering.
Sync runs through internal/syncer and is guarded by a process-wide lock so only one sync happens at a time (the caller waits up to ~10s). Each user can have their own git credentials file stored at WIKI_DATA_PATH/<username>.cred (same format as .git-credentials). Sync uses GIT_CONFIG_GLOBAL pointing at WIKI_DATA_PATH/<username>.gitconfig, and writes credential.helper to store credentials in that per-user .cred file.
The web server schedules background syncs using a ticker (configured by WIKI_GIT_SCHEDULE, default 10m). It builds an owner list from users in the auth file, and syncs WIKI_REPO_PATH/<owner> when that folder has a .git directory. Each owner uses <owner>.cred and <owner>.gitconfig in WIKI_DATA_PATH. Scheduler logging emits every git command at info level and errors at error level.
Auth unit tests.
TestHashAndVerify: test case for hash and verifyTestLoadFile: test case for load fileTestLoadFileDuplicateUser: test case for load file duplicate user
Config struct and defaults.
Load: loadsenvOr: helper for env orparseDurationOr: parses duration orparseIntOr: parses int or
Environment/.env config loading.
initEnvFile: helper for init env fileensureEnvFile: ensures v filerandomSecret: helper for random secretloadEnvFile: loads env file
Persisted collapsed section state.
SetCollapsedSections: sets collapsed sectionsCollapsedSections: helper for collapsed sectionsisSQLiteBusy: predicate for sqlite busy
Context helpers for visibility filters.
WithPublicVisibility: helper for with public visibilitypublicOnly: helper for public only
Embed cache storage.
GetEmbedCache: helper for get embed cacheUpsertEmbedCache: helper for upsert embed cache
Frontmatter parsing and update utilities.
EnsureFrontmatter: ensures frontmatterEnsureFrontmatterWithTitle: ensures frontmatter with titleEnsureFrontmatterWithTitleAndUser: ensures frontmatter with title and userEnsureFrontmatterWithTitleAndUserNoUpdated: ensures frontmatter with title and user no updatedensureFrontmatterWithTitleAndUser: ensures frontmatter with title and userSetVisibility: sets visibilitySetFolder: sets folderSetPriority: sets priorityHasFrontmatter: helper for has frontmatterFrontmatterBlock: helper for frontmatter blocksplitFrontmatterLines: helper for split frontmatter linesparseFrontmatterLine: parses frontmatter linevalueOrEmpty: helper for value or emptysetFrontmatterLine: sets frontmatter lineremoveFrontmatterLine: helper for remove frontmatter lineDeriveTitleFromBody: helper for derive title from bodyParseHistoryEntries: parses history entriesLatestHistoryTime: helper for latest history timeFrontmatterAttributes: helper for frontmatter attributesparseFrontmatterTime: parses frontmatter timecountHistoryEntries: counts history entriesaddHistoryEntry: helper for add history entryupsertHistoryEntry: helper for upsert history entrytrimHistoryEntries: helper for trim history entriesisIndentedLine: predicate for ndented lineinsertLines: helper for insert linesremoveRange: helper for remove range
Frontmatter unit tests.
TestEnsureFrontmatterAddsFields: test case for ensure frontmatter adds fieldsTestEnsureFrontmatterPreservesIDAndCreated: test case for ensure frontmatter preserves idand createdTestEnsureFrontmatterNoUpdated: test case for ensure frontmatter no updatedTestEnsureFrontmatterHistoryMax: test case for ensure frontmatter history maxTestEnsureFrontmatterHistoryMergeWindow: test case for ensure frontmatter history merge windowfmLineMap: helper for fm line map
SQLite index implementation (notes, tags, tasks, links, history).
dateToDay: helper for date to dayisJournalPath: predicate for journal pathjournalEndOfDayForPath: helper for journal end of day for pathapplyVisibilityFilter: helper for apply visibility filterapplyFolderFilter: helper for apply folder filterfolderWhere: helper for folder whereslugify: helper for slugifyOpen: opensClose: helper for closeRemoveNoteByPath: helper for remove note by pathInit: helper for initschemaVersion: helper for schema versionsetSchemaVersion: sets chema versionRebuildFromFS: helper for rebuild from fsRecheckFromFS: helper for recheck from fsIndexNote: helper for index noteIndexNoteIfChanged: helper for index note if changedRecentNotes: helper for recent notesRecentNotesPage: helper for recent notes pageNoteList: helper for note listOpenTasks: opens tasksOpenTasksByDate: opens tasks by dateTaskCountFilter: task count filter structCountTasks: counts tasks with filtersNotesWithOpenTasks: helper for notes with open tasksNotesWithDueTasks: helper for notes with due tasksNotesWithOpenTasksByDate: helper for notes with open tasks by dateNotesWithDueTasksByDate: helper for notes with due tasks by dateSearch: helper for searchListTags: lists tagsListTagsFiltered: lists tags filteredListTagsFilteredByDate: lists tags filtered by dateListTagsWithOpenTasks: lists tags with open tasksListTagsWithOpenTasksByDate: lists tags with open tasks by dateListTagsWithDueTasks: lists tags with due tasksListTagsWithDueTasksByDate: lists tags with due tasks by dateListFolders: lists foldersListUpdateDays: lists update daysCountNotesWithOpenTasks: counts notes with open tasksNoteSummaryByPath: helper for note summary by pathJournalNoteByDate: helper for journal note by dateNotesWithHistoryOnDate: helper for notes with history on dateJournalDates: helper for journal datesCountNotesWithOpenTasksByDate: counts notes with open tasks by dateCountNotesWithDueTasks: counts notes with due tasksCountNotesWithDueTasksByDate: counts notes with due tasks by dateBacklinks: helper for backlinksBrokenLinks: helper for broken linksbacklinkCandidates: helper for backlink candidatesloadFileRecords: loads file recordsremoveMissingRecords: helper for remove missing recordsnullIfEmpty: helper for null if emptynullIfZero: helper for null if zeroNoteExists: helper for note existsresolveLinkTargetID: helper for resolve link target idCountJournalNotes: helper for count journal notesFileIDByPath: helper for file idby pathPathByFileID: helper for path by file idPathByUID: helper for path by uidPathTitleByUID: helper for path title by uidPathByTitleNewest: helper for path by title newestDumpNoteList: helper for dump note listDebugDump: helper for debug dump
Visibility indexing tests.
TestPublicVisibilityFilter: test case for public visibility filter
Markdown parsing to metadata (tags, links, tasks).
ParseContent: parses contentUncheckedTasksSnippet: builds markdown snippet with unchecked tasksDueTasksSnippet: builds markdown snippet with due tasksFilterCompletedTasksSnippet: removes completed task blocks for index cards, returns completed count, and preserves original task line numbers for checkbox IDsTaskLineHash: helper for task line hashcountIndentSpaces: helper for count indent spacesexpandTagPrefixes: helper for expand tag prefixessplitTagParts: helper for split tag partsStripFrontmatter: helper for strip frontmattersplitFrontmatter: helper for split frontmatterparseFrontmatter: parses frontmatterparseTitle: parses titleparseTagsFromFrontmatter: parses tags from frontmatterparsePriority: parses iority
Parser unit tests.
TestParseContent: test case for parse contentTestStripFrontmatter: test case for strip frontmatterTestUncheckedTasksSnippet: test case for unchecked tasks snippetTestDueTasksSnippet: test case for due tasks snippet
Database schema definition and version.
- (no functions)
Atomic file write helper.
WriteFileAtomic: helper for write file atomic
Atomic write tests.
TestWriteFileAtomic: test case for write file atomic
In-memory path lock.
NewLocker: constructs lockerLock: helper for lock
Path normalization helpers.
NormalizeNotePath: helper for normalize note pathNoteFilePath: helper for note file pathEnsureMDExt: ensures mdext
Path helper tests.
TestNormalizeNotePath: test case for normalize note path
Attachment handling tests.
TestAttachmentAccessByNoteID: test case for attachment access by note idTestRenderVideoAttachmentEmbed: test case for render video attachment embedTestAttachmentAndAssetAccessControl: test case for attachment and asset access control
Web auth middleware helpers.
newAuth: helper for new authMiddleware: helper for middlewareverify: helper for verifyAuthenticate: helper for authenticateCreateToken: helper for create tokentokenUser: helper for token userauthSecret: helper for auth secretsignJWT: helper for sign jwtparseJWT: parses jwthmacSHA256: helper for hmac sha256
Calendar model and URL builder.
buildCalendarMonth: builds calendar monthbuildDailyURL: builds daily url
Web context helpers.
WithUser: helper for with userCurrentUser: helper for current userIsAuthenticated: predicate for authenticated
Embed rendering tests.
TestRenderMarkdownEmbeds: test case for render markdown embedsTestRenderMarkdownCollapsedSections: test case for render markdown collapsed sections
HTTP handlers, markdown rendering, embeds, and UI helpers. This is the largest file — it contains HTTP handlers, goldmark AST node types for custom renderers (collapsible sections, embeds), and embed resolution logic.
Note: the function list below includes several repeated Kind, Dump, Extend, Transform entries — these are methods on different unexported goldmark AST node and renderer types (one per embed kind: YouTube, TikTok, Instagram, Maps, video, collapsible sections). They are not duplicates of a single function.
quickLauncherEntries: builds quick launcher resultshandleQuickLauncher: HTMX endpoint for quick launcher search- Index card rendering (
/notes/{path}/card) hides completed task blocks and adds a completed-task summary footer; full note view (/notes/{path}) is unchanged. Extend: helper for extendTransform: helper for transformshouldOpenNewTab: helper for should open new tabattachViewData: helper for attach view databuildJournalIndex: builds journal indexbuildJournalSidebar: builds journal sidebarbuildJournalFilterQuery: builds journal filter queryhistoryUser: helper for history userwithCollapsibleSectionState: helper for with collapsible section statecollapsibleSectionStateFromContext: helper for collapsible section state from contextcollapsedSectionState: helper for collapsed section statecollapsedSectionStateFromSections: helper for collapsed section state from sectionsrequireAuth: helper for require authnormalizeLineEndings: helper for normalize line endingsnormalizeFolderPath: helper for normalize folder pathisJournalNotePath: predicate for journal note pathlistAttachmentNames: lists attachment namesattachmentsRoot: helper for attachments roottempAttachmentsDir: helper for temp attachments dirnoteAttachmentsDir: helper for note attachments dirassetsRoot: helper for assets rootparseTagsParam: parses tags paramparseFolderParam: parses folder paramparseDateParam: parses date paramsplitSpecialTags: helper for split special tagstaskCheckboxID: helper for task checkbox idtaskCheckboxHTML: helper for task checkbox htmlparseTaskID: parses task iddecorateTaskCheckboxes: helper for decorate task checkboxesbuildTagLinks: builds tag linksbuildTagsQuery: builds tags querybuildDateQuery: builds date querybuildSearchQuery: builds search querybuildTagsURL: builds tags urlbuildFolderQuery: builds folder querybuildFolderURL: builds folder urlbuildFilterQuery: builds filter queryfolderOptions: helper for folder optionsbuildFolderTree: builds folder treeloadSpecialTagCounts: loads special tag countsloadFilteredTags: loads filtered tagsapplyRenderReplacements: applies render replacementsreplaceDueTokens: replaces due tokens with formatted badgesKind: helper for kindDump: helper for dumpExtend: helper for extendTransform: helper for transformheadingPlainText: helper for heading plain textheadingLineInfo: helper for heading line infonewCollapsibleSectionHTMLRenderer: helper for new collapsible section htmlrendererRegisterFuncs: helper for register funcsrenderCollapsibleSection: renders collapsible sectionKind: helper for kindDump: helper for dumpKind: helper for kindDump: helper for dumpExtend: helper for extendKind: helper for kindDump: helper for dumpExtend: helper for extendKind: helper for kindDump: helper for dumpExtend: helper for extendKind: helper for kindDump: helper for dumpExtend: helper for extendExtend: helper for extendTransform: helper for transformTransform: helper for transformTransform: helper for transformTransform: helper for transformTransform: helper for transformparagraphHasOnlyLink: helper for paragraph has only linktextMatchesURL: helper for text matches urlparagraphOnlyURL: helper for paragraph only urlparagraphOnlyLink: helper for paragraph only linkextractTextFromNode: helper for extract text from nodenewMapsEmbedHTMLRenderer: helper for new maps embed htmlrendererRegisterFuncs: helper for register funcsrenderMapsEmbed: renders maps embednewYouTubeEmbedHTMLRenderer: helper for new you tube embed htmlrendererRegisterFuncs: helper for register funcsrenderYouTubeEmbed: renders you tube embednewTikTokEmbedHTMLRenderer: helper for new tik tok embed htmlrendererRegisterFuncs: helper for register funcsrenderTikTokEmbed: renders tik tok embednewInstagramEmbedHTMLRenderer: helper for new instagram embed htmlrendererRegisterFuncs: helper for register funcsrenderInstagramEmbed: renders instagram embednewAttachmentVideoEmbedHTMLRenderer: helper for new attachment video embed htmlrendererRegisterFuncs: helper for register funcsrenderAttachmentVideoEmbed: renders attachment video embedisMapsAppShortLink: predicate for maps app short linkmapsEmbedContext: helper for maps embed contextyoutubeEmbedContext: helper for youtube embed contexttiktokEmbedContext: helper for tiktok embed contextinstagramEmbedContext: helper for instagram embed contextattachmentVideoEmbedContext: helper for attachment video embed contextisYouTubeURL: predicate for you tube urlisTikTokURL: predicate for tik tok urlisInstagramURL: predicate for nstagram urlattachmentVideoFromURL: helper for attachment video from urlyoutubeVideoID: helper for youtube video idlookupTikTokEmbed: helper for lookup tik tok embedlookupInstagramEmbed: helper for lookup instagram embedlookupYouTubeEmbed: helper for lookup you tube embedresolveTikTokEmbedNow: resolves tik tok embed nowresolveTikTokEmbedAsync: resolves tik tok embed asyncresolveTikTokEmbedWithClient: resolves tik tok embed with clientresolveInstagramEmbedNow: resolves instagram embed nowresolveInstagramEmbedAsync: resolves instagram embed asyncresolveInstagramEmbedWithClient: resolves instagram embed with clientresolveYouTubeEmbedNow: resolves you tube embed nowresolveYouTubeEmbedAsync: resolves you tube embed asyncresolveYouTubeEmbedWithClient: resolves you tube embed with clienttiktokEmbedIsInFlight: helper for tiktok embed is in flighttiktokEmbedMarkInFlight: helper for tiktok embed mark in flighttiktokEmbedClearInFlight: helper for tiktok embed clear in flighttiktokEmbedStoreFound: helper for tiktok embed store foundtiktokEmbedStoreFailure: helper for tiktok embed store failureinstagramEmbedIsInFlight: helper for instagram embed is in flightinstagramEmbedMarkInFlight: helper for instagram embed mark in flightinstagramEmbedClearInFlight: helper for instagram embed clear in flightinstagramEmbedStoreFound: helper for instagram embed store foundinstagramEmbedStoreFailure: helper for instagram embed store failureyoutubeEmbedIsInFlight: helper for youtube embed is in flightyoutubeEmbedMarkInFlight: helper for youtube embed mark in flightyoutubeEmbedClearInFlight: helper for youtube embed clear in flightyoutubeEmbedStoreFound: helper for youtube embed store foundyoutubeEmbedStoreFailure: helper for youtube embed store failurelookupMapsEmbed: helper for lookup maps embedresolveMapsEmbedNow: resolves maps embed nowresolveMapsEmbedAsync: resolves maps embed asyncresolveMapsEmbedWithClient: resolves maps embed with clientmapsEmbedIsInFlight: helper for maps embed is in flightmapsEmbedMarkInFlight: helper for maps embed mark in flightmapsEmbedClearInFlight: helper for maps embed clear in flightmapsEmbedStoreFound: helper for maps embed store foundmapsEmbedStoreFailure: helper for maps embed store failurenewTTLCache: helper for new ttlcacheIsActive: predicate for activeUpsert: helper for upsertDelete: helper for deleteevictOldest: helper for evict oldestbuildMapsEmbedURL: builds maps embed urlmapsEmbedQueryURL: helper for maps embed query urlhandleHome: HTTP handler for homehandleDaily: HTTP handler for dailyhandleLogin: HTTP handler for loginhandleLogout: HTTP handler for logouthandleSearch: HTTP handler for searchhandleTagSuggest: HTTP handler for tag suggesthandleJournalYear: HTTP handler for journal yearhandleJournalMonth: HTTP handler for journal monthhandleHomeNotesPage: HTTP handler for home notes pagehandleTasks: HTTP handler for taskshandleTodo: HTTP handler for todohandleToggleTask: HTTP handler for toggle taskloadHomeNotes: loads home noteshandleNewNote: HTTP handler for new notehandleNotes: HTTP handler for noteshandleViewNote: HTTP handler for view notehandleNoteDetailFragment: HTTP handler for note detail fragmenthandleNoteCardFragment: HTTP handler for note card fragmentbuildNoteCard: builds note cardbuildNoteViewData: builds note view databuildNoteCardData: builds note card dataresolveNotePath: resolves note pathhandleEditNote: HTTP handler for edit notehandleDeleteNote: HTTP handler for delete notehandleUploadAttachment: HTTP handler for upload attachmenthandleUploadTempAttachment: HTTP handler for upload temp attachmenthandleDeleteTempAttachment: HTTP handler for delete temp attachmenthandleDeleteAttachment: HTTP handler for delete attachmenthandleAttachmentFile: HTTP handler for attachment filehandleAssetFile: HTTP handler for asset filefirstPathSegment: helper for first path segmentnoteIDAccessible: helper for note idaccessibleensureVideoThumbnail: ensures video thumbnailgenerateVideoThumbnail: helper for generate video thumbnailpromoteTempAttachments: helper for promote temp attachmentshandleSaveNote: HTTP handler for save notehandleCollapsedSections: HTTP handler for collapsed sectionsrenderEditError: renders edit errorhandlePreview: HTTP handler for previewrenderMarkdown: renders markdownrenderNoteBody: renders note bodyrenderLineMarkdown: renders line markdownexpandWikiLinks: helper for expand wiki linksstripFirstHeading: helper for strip first headingresolveWikiLink: resolves wiki linkslugify: helper for slugifyuniqueNotePath: helper for unique note pathisHTMX: predicate for htmxsanitizeReturnURL: helper for sanitize return url
Web integration tests.
TestIntegrationFlow: test case for integration flowTestCollapsedSectionsRenderFromStore: test case for collapsed sections render from storedetailsTagForLine: helper for details tag for line
Logging configuration tests.
TestMain: test case for mainsetupTestLogger: sets up test loggerselectTestLogWriter: helper for select test log writer
HTTP server wiring and routes.
NewServer: constructs serverHandler: helper for handlerroutes: helper for routes
HTML template parsing and rendering.
MustParseTemplates: helper for must parse templatesresolveTemplateGlob: resolves template globRenderPage: renders pageRenderTemplate: renders template
View models and UI types.
QuickLauncherEntry: quick launcher item model
E2E tests run in Docker using the Playwright image (browsers bundled). The test runner installs Go and the Playwright driver inside the container.
make e2estarts thegwikiservice and runsgo testintests/e2e.- Base URL is configured via
E2E_BASE_URL(defaulthttp://gwiki:8080inside Docker).
Smoke test checks the home page, sidebar, and calendar rendering.