This commit is contained in:
parent
7f28661cb4
commit
ad5ffb7510
12
README.md
12
README.md
|
@ -34,17 +34,13 @@ Wide 是一个基于 **W**eb 的 Go 语言 **IDE**。
|
||||||
* 自动完成:Go/HTML 等
|
* 自动完成:Go/HTML 等
|
||||||
* 编译检查:编辑器提示编译错误
|
* 编译检查:编辑器提示编译错误
|
||||||
* 格式化:Go/HTML/JSON 等
|
* 格式化:Go/HTML/JSON 等
|
||||||
* 运行:支持同时运行多个程序,方便联调
|
* 运行:支持同时运行多个程序
|
||||||
* 多用户:团队开发,方便协作
|
|
||||||
* 代码导航:跳转到声明,查找使用,文件搜索等
|
* 代码导航:跳转到声明,查找使用,文件搜索等
|
||||||
* Web 开发:前端(HTML/JS/CSS)开发支持
|
* Web 开发:前端(HTML/JS/CSS)开发支持
|
||||||
* go tool:go get/install/fmt 等
|
* go tool:go get/install/fmt 等
|
||||||
* 项目导入/导出
|
* 项目文件导出
|
||||||
* UI/编辑器多主题
|
* UI/编辑器多主题
|
||||||
* 支持交叉编译
|
* 支持交叉编译
|
||||||
* 调试:基于 gdb 的调试系统(TBD)
|
|
||||||
* Git 整合:常用 git 命令可视化操作(TBD)
|
|
||||||
* Shell:连接到服务器执行命令(TBD)
|
|
||||||
|
|
||||||
## 界面
|
## 界面
|
||||||
|
|
||||||
|
@ -72,10 +68,6 @@ Wide 是一个基于 **W**eb 的 Go 语言 **IDE**。
|
||||||
|
|
||||||
![Build Error Info](https://cloud.githubusercontent.com/assets/873584/5450632/3e51cccc-8543-11e4-8ca8-8d2427aa16b8.png)
|
![Build Error Info](https://cloud.githubusercontent.com/assets/873584/5450632/3e51cccc-8543-11e4-8ca8-8d2427aa16b8.png)
|
||||||
|
|
||||||
### Git 克隆
|
|
||||||
|
|
||||||
![Git Clone](https://cloud.githubusercontent.com/assets/873584/6545235/2284f230-c5b7-11e4-985e-7e04367921b1.png)
|
|
||||||
|
|
||||||
### 交叉编译
|
### 交叉编译
|
||||||
|
|
||||||
![Cross-Compilation](https://cloud.githubusercontent.com/assets/873584/10130037/226d75fc-65f7-11e5-94e4-25ee579ca175.png)
|
![Cross-Compilation](https://cloud.githubusercontent.com/assets/873584/10130037/226d75fc-65f7-11e5-94e4-25ee579ca175.png)
|
||||||
|
|
|
@ -87,6 +87,9 @@ var Users []*User
|
||||||
// Indicates whether Docker is available.
|
// Indicates whether Docker is available.
|
||||||
var Docker bool
|
var Docker bool
|
||||||
|
|
||||||
|
// Docker image to run user's program
|
||||||
|
const DockerImageGo = "golang"
|
||||||
|
|
||||||
// Load loads the Wide configurations from wide.json and users' configurations from users/{username}.json.
|
// Load loads the Wide configurations from wide.json and users' configurations from users/{username}.json.
|
||||||
func Load(confPath, confUsers, confIP, confPort, confServer, confLogLevel, confStaticServer, confContext, confChannel, confPlayground string, confUsersWorkspaces string) {
|
func Load(confPath, confUsers, confIP, confPort, confServer, confLogLevel, confStaticServer, confContext, confChannel, confPlayground string, confUsersWorkspaces string) {
|
||||||
initWide(confPath, confUsers, confIP, confPort, confServer, confLogLevel, confStaticServer, confContext, confChannel, confPlayground, confUsersWorkspaces)
|
initWide(confPath, confUsers, confIP, confPort, confServer, confLogLevel, confStaticServer, confContext, confChannel, confPlayground, confUsersWorkspaces)
|
||||||
|
|
|
@ -51,7 +51,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if conf.Docker {
|
if conf.Docker {
|
||||||
fileName := filepath.Base(filePath)
|
fileName := filepath.Base(filePath)
|
||||||
cmd = exec.Command("timeout", "5", "docker", "run", "--rm", "-v", filePath+":/"+fileName, "busybox", "/"+fileName)
|
cmd = exec.Command("timeout", "5", "docker", "run", "--rm", "-v", filePath+":/"+fileName, conf.DockerImageGo, "/"+fileName)
|
||||||
} else {
|
} else {
|
||||||
cmd = exec.Command(filePath)
|
cmd = exec.Command(filePath)
|
||||||
curDir := filepath.Dir(filePath)
|
curDir := filepath.Dir(filePath)
|
||||||
|
|
|
@ -52,7 +52,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if conf.Docker {
|
if conf.Docker {
|
||||||
fileName := filepath.Base(filePath)
|
fileName := filepath.Base(filePath)
|
||||||
cmd = exec.Command("timeout", "5", "docker", "run", "--rm", "-v", filePath+":/"+fileName, "busybox", "/"+fileName)
|
cmd = exec.Command("timeout", "5", "docker", "run", "--rm", "-v", filePath+":/"+fileName, conf.DockerImageGo, "/"+fileName)
|
||||||
} else {
|
} else {
|
||||||
cmd = exec.Command(filePath)
|
cmd = exec.Command(filePath)
|
||||||
curDir := filepath.Dir(filePath)
|
curDir := filepath.Dir(filePath)
|
||||||
|
|
Loading…
Reference in New Issue