-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (27 loc) · 960 Bytes
/
Copy pathmain.go
File metadata and controls
32 lines (27 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"embed"
"log"
"markdownmd/app"
)
// The embed lives here at the module root so its path reaches frontend/dist
// without "..". With -tags pro, the same dist also contains the pro
// frontend modules (vite's @pro alias resolves into the md-pro
// sibling at build time).
//
//go:embed all:frontend/dist
var assets embed.FS
// currentVersion is the running app version, used by the self-updater to
// compare against GitHub releases. Overridden at release-build time via
// -ldflags "-X main.currentVersion=<tag>"; stays "dev" for local builds.
var currentVersion = "dev"
func main() {
opts := app.Options{Assets: assets, Version: currentVersion}
// applyPro is a no-op in the default OSS build; with -tags pro it pulls
// in the private md-pro module and wires its services + menus.
// See pro_off.go / pro_on.go and ../md-pro/docs/pro-features.md.
applyPro(&opts)
if err := app.Run(opts); err != nil {
log.Fatal(err)
}
}