Feature(Go): Embed and serve web UI assets

This commit is contained in:
yuanyuanxiang
2026-05-17 20:56:34 +02:00
committed by yuanyuanxiang
parent 2ed86b5e08
commit 534d3650c4
11 changed files with 449 additions and 11 deletions

View File

@@ -10,7 +10,8 @@
"cwd": "${workspaceFolder}",
"args": [],
"env": {},
"console": "integratedTerminal"
"console": "integratedTerminal",
"preLaunchTask": "sync-web-assets"
},
{
"name": "Debug Server",
@@ -24,7 +25,8 @@
],
"env": {},
"console": "integratedTerminal",
"buildFlags": "-gcflags='all=-N -l'"
"buildFlags": "-gcflags='all=-N -l'",
"preLaunchTask": "sync-web-assets"
}
]
}

20
server/go/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "sync-web-assets",
"type": "shell",
"command": "powershell",
"args": [
"-NoProfile",
"-Command",
"New-Item -ItemType Directory -Force -Path '${workspaceFolder}\\web\\assets' | Out-Null; Copy-Item -Force '${workspaceFolder}\\..\\web\\index.html' '${workspaceFolder}\\web\\assets\\index.html'"
],
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": []
}
]
}