This commit is contained in:
Liang Ding 2019-05-16 18:42:47 +08:00
parent 7f28661cb4
commit ad5ffb7510
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
4 changed files with 7 additions and 12 deletions

View File

@ -34,17 +34,13 @@ Wide 是一个基于 **W**eb 的 Go 语言 **IDE**。
* 自动完成Go/HTML 等
* 编译检查:编辑器提示编译错误
* 格式化Go/HTML/JSON 等
* 运行:支持同时运行多个程序,方便联调
* 多用户:团队开发,方便协作
* 运行:支持同时运行多个程序
* 代码导航:跳转到声明,查找使用,文件搜索等
* Web 开发前端HTML/JS/CSS开发支持
* go toolgo get/install/fmt 等
* 项目导入/导出
* 项目文件导出
* 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)
### 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)

View File

@ -87,6 +87,9 @@ var Users []*User
// Indicates whether Docker is available.
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.
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)

View File

@ -51,7 +51,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
var cmd *exec.Cmd
if conf.Docker {
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 {
cmd = exec.Command(filePath)
curDir := filepath.Dir(filePath)

View File

@ -52,7 +52,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
var cmd *exec.Cmd
if conf.Docker {
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 {
cmd = exec.Command(filePath)
curDir := filepath.Dir(filePath)