mirror of
https://shylinux.com/x/icebergs
synced 2025-04-28 18:22:02 +08:00
opt some
This commit is contained in:
parent
ad51f58034
commit
67e0127be8
98
README.md
98
README.md
@ -2,67 +2,67 @@
|
|||||||
|
|
||||||
icebergs是一个后端框架,通过模块化、集群化实现资源的无限的扩展与自由的组合。
|
icebergs是一个后端框架,通过模块化、集群化实现资源的无限的扩展与自由的组合。
|
||||||
|
|
||||||
使用icebergs可以将各种模块或项目集成到一起,快速开发出集中式的服务器。
|
- 使用icebergs可以将各种模块或项目集成到一起,快速开发出集中式的服务器。
|
||||||
|
- 使用icebergs可以将各种设备自由的组合在一起,快速搭建起分布式的服务器。
|
||||||
|
|
||||||
使用icebergs可以将各种设备自由的组合在一起,快速搭建起分布式的服务器。
|
所以通过icebergs开发出来的各种模块,无需任何多余代码,就可以独立运行,可以成为系统命令,可以远程调用,可以成为前端插件,可以成为小程序页面。
|
||||||
|
从而提高代码的复用性与灵活性。
|
||||||
|
|
||||||
所以通过icebergs开发出来的模块,无需任何多余代码,就可以独立运行,可以成为系统命令,可以远程调用,可以成为前端插件,可以成为小程序页面。
|
## 1. 项目开发
|
||||||
|
|
||||||
## 项目开发
|
### 1.1 一键创建项目
|
||||||
开发环境,需要安装git,golang
|
*开发环境,需要安装git和golang*
|
||||||
|
```sh
|
||||||
一键创建项目
|
|
||||||
```
|
|
||||||
mkdir miss; cd miss && curl -s https://shylinux.com/publish/template.sh | sh
|
mkdir miss; cd miss && curl -s https://shylinux.com/publish/template.sh | sh
|
||||||
```
|
```
|
||||||
|
### 1.2 一键部署项目
|
||||||
运行环境,如需前端页面访问服务,需要安装git
|
*运行环境,如需通过前端页面访问服务,则需要安装git*
|
||||||
一键复制项目
|
```sh
|
||||||
```
|
export ctx_dev=http://127.0.0.1:9020 && curl -s $ctx_dev/publish/ice.sh | sh
|
||||||
export ctx_dev=http://127.0.0.1:9020 && curl -s $ctx_dev/publish/ice.sh
|
|
||||||
```
|
```
|
||||||
|
*ctx_dev是开发机地址,不必是本机地址,可以是任意一台先前创建过项目的机器地址。*
|
||||||
|
|
||||||
## 1 原型 type.go
|
## 2 原型设计 type.go
|
||||||
### 1.1 msg.Detail
|
### 2.1 msg.Detail
|
||||||
### 1.2 msg.Option
|
### 2.2 msg.Option
|
||||||
### 1.3 msg.Append
|
### 2.3 msg.Append
|
||||||
### 1.4 msg.Result
|
### 2.4 msg.Result
|
||||||
### 1.5 msg.Travel
|
### 2.5 msg.Travel
|
||||||
### 1.6 msg.Search
|
### 2.6 msg.Search
|
||||||
### 1.7 msg.Conf
|
### 2.7 msg.Conf
|
||||||
### 1.8 msg.Cmd
|
### 2.8 msg.Cmd
|
||||||
### 1.9 msg.Cap
|
### 2.9 msg.Cap
|
||||||
|
|
||||||
## 2 框架 base.go
|
## 3 框架 base.go
|
||||||
### 2.1 注册模块 Register
|
### 3.1 注册模块 Register
|
||||||
### 2.2 创建资源 Begin
|
### 3.2 创建资源 Begin
|
||||||
### 2.3 加载配置 _init
|
### 3.3 加载配置 _init
|
||||||
### 2.4 启动服务 Start
|
### 3.4 启动服务 Start
|
||||||
### 2.5 保存配置 _exit
|
### 3.5 保存配置 _exit
|
||||||
### 2.6 释放资源 Close
|
### 3.6 释放资源 Close
|
||||||
|
|
||||||
## 3 基础模块 base/
|
## 4 基础模块 base/
|
||||||
### 3.1 模块中心 base/ctx
|
### 4.1 模块中心 base/ctx
|
||||||
### 3.2 命令中心 base/cli
|
### 4.2 命令中心 base/cli
|
||||||
### 3.3 认证中心 base/aaa
|
### 4.3 认证中心 base/aaa
|
||||||
### 3.4 网页中心 base/web
|
### 4.4 网页中心 base/web
|
||||||
|
|
||||||
### 3.5 词法中心 base/lex
|
### 4.5 词法中心 base/lex
|
||||||
### 3.6 语法中心 base/yac
|
### 4.6 语法中心 base/yac
|
||||||
### 3.7 事件中心 base/gdb
|
### 4.7 事件中心 base/gdb
|
||||||
### 3.8 日志中心 base/log
|
### 4.8 日志中心 base/log
|
||||||
|
|
||||||
### 3.9 网络中心 base/tcp
|
### 4.9 网络中心 base/tcp
|
||||||
### 3.10 文件中心 base/nfs
|
### 4.10 文件中心 base/nfs
|
||||||
### 3.11 终端中心 base/ssh
|
### 4.11 终端中心 base/ssh
|
||||||
### 3.12 数据中心 base/mdb
|
### 4.12 数据中心 base/mdb
|
||||||
|
|
||||||
## 4 核心模块 core/
|
## 5 核心模块 core/
|
||||||
### 4.1 编程中心 core/code
|
### 5.1 编程中心 core/code
|
||||||
### 4.2 文档中心 core/wiki
|
### 5.2 文档中心 core/wiki
|
||||||
### 4.3 聊天中心 core/chat
|
### 5.3 聊天中心 core/chat
|
||||||
### 4.4 团队中心 core/team
|
### 5.4 团队中心 core/team
|
||||||
### 4.5 贸易中心 core/mall
|
### 5.5 贸易中心 core/mall
|
||||||
|
|
||||||
## 5 配置 conf.go
|
## 5 配置 conf.go
|
||||||
### 5.1 环境 init
|
### 5.1 环境 init
|
||||||
|
@ -46,6 +46,13 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心",
|
|||||||
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "total", "cli.git")
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "total", "cli.git")
|
||||||
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "branch", "cli.git")
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "branch", "cli.git")
|
||||||
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "status", "cli.git")
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "status", "cli.git")
|
||||||
|
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "storm", "note")
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "total", "cli.git")
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "date", "web.team")
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "miss", "web.team")
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "progress", "web.team")
|
||||||
|
m.Cmd(ice.WEB_FAVOR, "river.root", "field", "note", "web.wiki")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户权限
|
// 用户权限
|
||||||
|
@ -119,10 +119,7 @@ var Index = &ice.Context{Name: "team", Help: "团队中心",
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
"stat": {Name: "stat", Help: "统计", Meta: kit.Dict(
|
"stat": {Name: "stat", Help: "统计", Meta: kit.Dict(), Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
||||||
"display", "demo.wasm",
|
|
||||||
// "display", "github.com/shylinux/icebergs/core/team/stat",
|
|
||||||
), Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
|
||||||
hot := kit.Select(ice.FAVOR_MISS, m.Option("hot"))
|
hot := kit.Select(ice.FAVOR_MISS, m.Option("hot"))
|
||||||
stat := map[string]int{}
|
stat := map[string]int{}
|
||||||
m.Option("cache.limit", "1000")
|
m.Option("cache.limit", "1000")
|
||||||
@ -136,8 +133,7 @@ var Index = &ice.Context{Name: "team", Help: "团队中心",
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
"progress": {Name: "progress", Help: "进度", Meta: kit.Dict(
|
"progress": {Name: "progress", Help: "进度", Meta: kit.Dict(
|
||||||
"remote", "you",
|
"remote", "you", "display", "team/miss",
|
||||||
"display", "github.com/shylinux/icebergs/core/team/miss",
|
|
||||||
"detail", []string{"回退", "前进", "取消", "完成"},
|
"detail", []string{"回退", "前进", "取消", "完成"},
|
||||||
), List: kit.List(
|
), List: kit.List(
|
||||||
kit.MDB_INPUT, "text", "value", "",
|
kit.MDB_INPUT, "text", "value", "",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package wiki
|
package wiki
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/gomarkdown/markdown"
|
||||||
"github.com/shylinux/icebergs"
|
"github.com/shylinux/icebergs"
|
||||||
_ "github.com/shylinux/icebergs/base"
|
_ "github.com/shylinux/icebergs/base"
|
||||||
"github.com/shylinux/icebergs/base/web"
|
"github.com/shylinux/icebergs/base/web"
|
||||||
@ -195,7 +196,11 @@ var Index = &ice.Context{Name: "wiki", Help: "文档中心",
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 生成网页
|
// 生成网页
|
||||||
m.Echo(string(buffer.Bytes()))
|
data := buffer.Bytes()
|
||||||
|
if strings.HasSuffix(arg[0], ".md") {
|
||||||
|
data = markdown.ToHTML(buffer.Bytes(), nil, nil)
|
||||||
|
}
|
||||||
|
m.Echo(string(data))
|
||||||
}},
|
}},
|
||||||
"_tree": {Name: "_tree path", Help: "文库", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
"_tree": {Name: "_tree path", Help: "文库", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
||||||
m.Option("dir_deep", "true")
|
m.Option("dir_deep", "true")
|
||||||
@ -203,7 +208,7 @@ var Index = &ice.Context{Name: "wiki", Help: "文档中心",
|
|||||||
m.Cmdy("nfs.dir", kit.Select(m.Conf("note", "meta.path"), arg, 0), m.Conf("note", "meta.head"))
|
m.Cmdy("nfs.dir", kit.Select(m.Conf("note", "meta.path"), arg, 0), m.Conf("note", "meta.head"))
|
||||||
}},
|
}},
|
||||||
"note": {Name: "note file", Help: "笔记", Meta: kit.Dict("remote", "you", "display", "inner"), List: kit.List(
|
"note": {Name: "note file", Help: "笔记", Meta: kit.Dict("remote", "you", "display", "inner"), List: kit.List(
|
||||||
kit.MDB_INPUT, "text", "name", "path", "value", "miss.md",
|
kit.MDB_INPUT, "text", "name", "path", "value", "README.md",
|
||||||
kit.MDB_INPUT, "button", "name", "执行", "action", "auto",
|
kit.MDB_INPUT, "button", "name", "执行", "action", "auto",
|
||||||
kit.MDB_INPUT, "button", "name", "返回", "cb", "Last",
|
kit.MDB_INPUT, "button", "name", "返回", "cb", "Last",
|
||||||
), Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
), Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
||||||
|
1
go.mod
1
go.mod
@ -3,6 +3,7 @@ module github.com/shylinux/icebergs
|
|||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/gomarkdown/markdown v0.0.0-20200112043221-ec51d717629d
|
||||||
github.com/gorilla/websocket v1.4.1
|
github.com/gorilla/websocket v1.4.1
|
||||||
github.com/shylinux/toolkits v0.1.0
|
github.com/shylinux/toolkits v0.1.0
|
||||||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086
|
||||||
|
3
go.sum
3
go.sum
@ -1,6 +1,9 @@
|
|||||||
|
github.com/gomarkdown/markdown v0.0.0-20200112043221-ec51d717629d h1:Qw3Ku+gg4x3gfv71ayr0SbjJYWpWD10XoS9JbtFgvbg=
|
||||||
|
github.com/gomarkdown/markdown v0.0.0-20200112043221-ec51d717629d/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
|
||||||
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/shylinux/toolkits v0.1.0 h1:7ghnVEjuwLf7zBsyeR37ahm2gaOKIyjSw9F9Pp9oTBU=
|
github.com/shylinux/toolkits v0.1.0 h1:7ghnVEjuwLf7zBsyeR37ahm2gaOKIyjSw9F9Pp9oTBU=
|
||||||
github.com/shylinux/toolkits v0.1.0/go.mod h1:Y68Ot6xOmo1bun67YvqC3chDGeU2gDxtsUnvVDGJm4g=
|
github.com/shylinux/toolkits v0.1.0/go.mod h1:Y68Ot6xOmo1bun67YvqC3chDGeU2gDxtsUnvVDGJm4g=
|
||||||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 h1:RYiqpb2ii2Z6J4x0wxK46kvPBbFuZcdhS+CIztmYgZs=
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 h1:RYiqpb2ii2Z6J4x0wxK46kvPBbFuZcdhS+CIztmYgZs=
|
||||||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
|
||||||
|
golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
all:
|
all:
|
||||||
@echo && date
|
@echo && date
|
||||||
|
export GOPRIVATE=github.com
|
||||||
go build -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart
|
go build -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart
|
||||||
|
125
miss/README.md
125
miss/README.md
@ -1,125 +0,0 @@
|
|||||||
{{title "ICEBERGS"}}
|
|
||||||
{{brief `icebergs是一个后端框架,通过模块化、集群化实现资源的无限的扩展与自由的组合。`}}
|
|
||||||
|
|
||||||
{{chain "icebergs" `
|
|
||||||
icebergs
|
|
||||||
type.go
|
|
||||||
msg.Detail
|
|
||||||
msg.Option
|
|
||||||
msg.Append
|
|
||||||
msg.Result
|
|
||||||
msg.Travel
|
|
||||||
msg.Search
|
|
||||||
msg.Conf
|
|
||||||
msg.Cmd
|
|
||||||
msg.Cap
|
|
||||||
base.go bg blue
|
|
||||||
Begin
|
|
||||||
_init
|
|
||||||
Start bg red
|
|
||||||
code
|
|
||||||
wiki
|
|
||||||
chat
|
|
||||||
ocean
|
|
||||||
river
|
|
||||||
action
|
|
||||||
storm
|
|
||||||
steam
|
|
||||||
team
|
|
||||||
mall
|
|
||||||
_exit
|
|
||||||
Close
|
|
||||||
conf.go
|
|
||||||
init
|
|
||||||
host
|
|
||||||
boot
|
|
||||||
node
|
|
||||||
user
|
|
||||||
work
|
|
||||||
auth
|
|
||||||
data
|
|
||||||
file
|
|
||||||
` "" "" 16}}
|
|
||||||
|
|
||||||
{{shell "一键创建项目" "usr" "install" `mkdir miss; cd miss && curl -s https://shylinux.com/publish/build.sh | sh`}}
|
|
||||||
|
|
||||||
{{shell "一键启动项目" "usr" "install" `mkdir miss; cd miss && curl -s https://shylinux.com/publish/ice.sh | sh`}}
|
|
||||||
|
|
||||||
{{chapter "配置模块 base/ctx"}}
|
|
||||||
{{chapter "命令模块 base/cli"}}
|
|
||||||
cli模块用于与系统进行交互。
|
|
||||||
|
|
||||||
{{order "命令" `
|
|
||||||
系统信息 ice.CLI_RUNTIME
|
|
||||||
系统命令 ice.CLI_SYSTEM
|
|
||||||
`}}
|
|
||||||
|
|
||||||
{{chapter "通信模块 base/tcp"}}
|
|
||||||
tcp模块用于管理网络的读写
|
|
||||||
|
|
||||||
{{chapter "存储模块 base/nfs"}}
|
|
||||||
nfs模块用于管理文件的读写。
|
|
||||||
|
|
||||||
{{chapter "终端模块 base/ssh"}}
|
|
||||||
ssh模块用于与终端交互。
|
|
||||||
|
|
||||||
{{chapter "数据模块 base/mdb"}}
|
|
||||||
mdb模块用于管理数据的读写。
|
|
||||||
|
|
||||||
{{chapter "词法模块 base/lex"}}
|
|
||||||
|
|
||||||
{{chapter "语法模块 base/yac"}}
|
|
||||||
|
|
||||||
{{chapter "日志模块 base/log"}}
|
|
||||||
log模块负责输出日志。
|
|
||||||
|
|
||||||
{{chapter "事件模块 base/gdb"}}
|
|
||||||
gdb模块会根据各种触发条件,择机执行各种命令。
|
|
||||||
|
|
||||||
{{order "命令" `
|
|
||||||
信号器 ice.SIGNAL
|
|
||||||
定时器 ice.TIMER
|
|
||||||
触发器 ice.EVENT
|
|
||||||
`}}
|
|
||||||
|
|
||||||
{{chapter "认证模块 base/aaa"}}
|
|
||||||
aaa模块用于各种权限管理与身份认证。
|
|
||||||
|
|
||||||
{{order "命令" `
|
|
||||||
角色 ice.AAA_ROLE
|
|
||||||
用户 ice.AAA_USER
|
|
||||||
会话 ice.AAA_SESS
|
|
||||||
`}}
|
|
||||||
|
|
||||||
{{chapter "网络模块 base/web"}}
|
|
||||||
web模块用于组织网络节点,与生成前端网页,
|
|
||||||
|
|
||||||
{{section "网络爬虫 ice.WEB_SPIDE"}}
|
|
||||||
WEB_SPIDE功能,用于发送网络请求获取相关数据。
|
|
||||||
|
|
||||||
{{section "网络服务 ice.WEB_SERVE"}}
|
|
||||||
WEB_SERVE功能,用于启动网络服务器接收网络请求。
|
|
||||||
|
|
||||||
{{section "网络节点 ice.WEB_SPACE"}}
|
|
||||||
WEB_SPACE功能,用于与相连网络节点进行通信。
|
|
||||||
|
|
||||||
{{section "网络任务 ice.WEB_DREAM"}}
|
|
||||||
WEB_DREAM功能,用于启动本地节点,管理各种任务的相关资源。
|
|
||||||
|
|
||||||
{{section "网络收藏 ice.WEB_FAVOR"}}
|
|
||||||
WEB_FAVOR功能,用于收藏各种实时数据,进行分类管理。
|
|
||||||
|
|
||||||
{{section "网络缓存 ice.WEB_CACHE"}}
|
|
||||||
WEB_CACHE功能,用于管理缓存数据,自动存储与传输。
|
|
||||||
|
|
||||||
{{section "网络存储 ice.WEB_STORY"}}
|
|
||||||
WEB_STORY功能,用于记录数据的历史变化,可以查看任意历史版本。
|
|
||||||
|
|
||||||
{{section "网络共享 ice.WEB_SHARE"}}
|
|
||||||
WEB_SHARE功能,用于数据与应用的共享,可以查到所有数据流通记录。
|
|
||||||
|
|
||||||
{{section "网络路由 ice.WEB_ROUTE"}}
|
|
||||||
{{section "网络代理 ice.WEB_PROXY"}}
|
|
||||||
{{section "网络分组 ice.WEB_GROUP"}}
|
|
||||||
{{section "网络标签 ice.WEB_LABEL"}}
|
|
||||||
|
|
1
miss/README.md
Symbolic link
1
miss/README.md
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../README.md
|
10
miss/go.mod
Normal file
10
miss/go.mod
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
module miss
|
||||||
|
|
||||||
|
go 1.13
|
||||||
|
|
||||||
|
require github.com/shylinux/icebergs v0.1.9 // indirect
|
||||||
|
|
||||||
|
replace (
|
||||||
|
github.com/shylinux/icebergs => ../
|
||||||
|
github.com/shylinux/toolkits => ../../toolkits
|
||||||
|
)
|
7
miss/go.sum
Normal file
7
miss/go.sum
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
github.com/gomarkdown/markdown v0.0.0-20200112043221-ec51d717629d h1:Qw3Ku+gg4x3gfv71ayr0SbjJYWpWD10XoS9JbtFgvbg=
|
||||||
|
github.com/gomarkdown/markdown v0.0.0-20200112043221-ec51d717629d/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
|
||||||
|
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||||
|
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 h1:RYiqpb2ii2Z6J4x0wxK46kvPBbFuZcdhS+CIztmYgZs=
|
||||||
|
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
|
||||||
|
golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
|
12
miss/src/main.go
Normal file
12
miss/src/main.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/shylinux/icebergs"
|
||||||
|
_ "github.com/shylinux/icebergs/base"
|
||||||
|
_ "github.com/shylinux/icebergs/core"
|
||||||
|
_ "github.com/shylinux/icebergs/misc"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
println(ice.Run())
|
||||||
|
}
|
1
miss/usr/volcanos
Symbolic link
1
miss/usr/volcanos
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../volcanos
|
@ -29,7 +29,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
END
|
END
|
||||||
|
|
||||||
[ -f src/go.mod ] || cd src && go mod init ${ice_mod} && cd ..
|
[ -f go.mod ] || go mod init ${ice_mod}
|
||||||
|
|
||||||
[ -f Makefile ] || cat >> Makefile <<END
|
[ -f Makefile ] || cat >> Makefile <<END
|
||||||
all:
|
all:
|
||||||
@ -94,7 +94,7 @@ END
|
|||||||
build() {
|
build() {
|
||||||
export GOPRIVATE=github.com
|
export GOPRIVATE=github.com
|
||||||
miss=./ && [ "$1" != "" ] && miss=$1 && shift && mkdir $miss
|
miss=./ && [ "$1" != "" ] && miss=$1 && shift && mkdir $miss
|
||||||
cd $miss && prepare && cd src && go build -o ../${ice_bin} ../${main_go} && cd .. && chmod u+x ${ice_bin} && ./${ice_sh} start serve dev
|
cd $miss && prepare && go build -o ${ice_bin} ${main_go} && chmod u+x ${ice_bin} && ./${ice_sh} start serve dev
|
||||||
}
|
}
|
||||||
|
|
||||||
tutor() {
|
tutor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user