From 1f974390c41d7d686b8f92a85f244f05d075c246 Mon Sep 17 00:00:00 2001 From: shaoying Date: Sun, 30 May 2021 23:37:39 +0800 Subject: [PATCH] opt some --- base/aaa/role.go | 3 +- base/aaa/sess.go | 2 -- base/aaa/user.go | 5 ++-- base/ctx/command.go | 4 +-- base/log/log.go | 73 +++++++++++++++++++++++++++++---------------- base/nfs/cat.go | 10 +++---- base/nfs/dir.go | 6 ++-- base/nfs/save.go | 6 ++-- base/nfs/tail.go | 34 ++++++++++++++++----- base/nfs/trash.go | 19 +++++++----- base/ssh/channel.go | 10 +++---- base/ssh/connect.go | 19 ++++++------ base/ssh/service.go | 16 +++++----- base/ssh/session.go | 9 ++---- base/ssh/ssh.go | 8 +++-- base/ssh/ssh.shy | 5 ++-- conf.go | 2 ++ logs.go | 6 ++-- 18 files changed, 139 insertions(+), 98 deletions(-) diff --git a/base/aaa/role.go b/base/aaa/role.go index 74a768f8..73ca4481 100644 --- a/base/aaa/role.go +++ b/base/aaa/role.go @@ -131,12 +131,13 @@ func init() { }) }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { - if len(arg) < 2 { + if len(arg) < 2 { // 角色列表 _role_list(m, kit.Select("", arg, 0)) m.PushAction(mdb.REMOVE) return } + // 设置角色 _role_user(m, arg[0], arg[1:]...) }}, }, diff --git a/base/aaa/sess.go b/base/aaa/sess.go index 7b73eb9b..c43e9887 100644 --- a/base/aaa/sess.go +++ b/base/aaa/sess.go @@ -53,8 +53,6 @@ func SessIsCli(m *ice.Message) bool { const ( IP = "ip" UA = "ua" - - SESSID = "sessid" ) const ( diff --git a/base/aaa/user.go b/base/aaa/user.go index 9cfdc244..b5257ea9 100644 --- a/base/aaa/user.go +++ b/base/aaa/user.go @@ -33,8 +33,7 @@ func _user_remove(m *ice.Message, name string) { } func _user_search(m *ice.Message, kind, name, text string) { m.Richs(USER, nil, kit.MDB_FOREACH, func(key string, value map[string]interface{}) { - value = kit.GetMeta(value) - if name != "" && name != value[USERNAME] { + if value = kit.GetMeta(value); name != "" && name != value[USERNAME] { return } m.PushSearch(kit.SSH_CMD, USER, kit.MDB_TYPE, kit.Format(UserRole(m, value[USERNAME])), @@ -144,7 +143,7 @@ func init() { m.Table(func(index int, value map[string]string, head []string) { m.Push(USERROLE, UserRole(m, value[USERNAME])) }) - m.PushAction(ROLE, mdb.REMOVE) + m.PushAction(mdb.REMOVE) }}, }, }) diff --git a/base/ctx/command.go b/base/ctx/command.go index 387035c0..ffc226a3 100644 --- a/base/ctx/command.go +++ b/base/ctx/command.go @@ -39,8 +39,8 @@ func _command_search(m *ice.Message, kind, name, text string) { return } - m.PushSearch(kit.SSH_CMD, COMMAND, CONTEXT, s.Cap(ice.CTX_FOLLOW), COMMAND, key, - kit.MDB_TYPE, kind, kit.MDB_NAME, key, kit.MDB_TEXT, s.Cap(ice.CTX_FOLLOW), + m.PushSearch(kit.SSH_CMD, COMMAND, CONTEXT, m.Prefix(), COMMAND, key, + kit.MDB_TYPE, kind, kit.MDB_NAME, key, kit.MDB_TEXT, m.Prefix(), ) }) } diff --git a/base/log/log.go b/base/log/log.go index 1b5aad14..1f7213f2 100644 --- a/base/log/log.go +++ b/base/log/log.go @@ -1,11 +1,11 @@ package log import ( - ice "github.com/shylinux/icebergs" - kit "github.com/shylinux/toolkits" - "bufio" "path" + + ice "github.com/shylinux/icebergs" + kit "github.com/shylinux/toolkits" ) type Log struct { @@ -35,19 +35,19 @@ func (f *Frame) Start(m *ice.Message, arg ...string) bool { break } - file := kit.Select("bench", m.Conf("show", kit.Keys(l.l, "file"))) - view := m.Confm("view", m.Conf("show", kit.Keys(l.l, "view"))) - bio := m.Confv("file", file+".file").(*bufio.Writer) + file := kit.Select(BENCH, m.Conf(SHOW, kit.Keys(l.l, FILE))) + view := m.Confm(VIEW, m.Conf(SHOW, kit.Keys(l.l, VIEW))) + bio := m.Confv(FILE, kit.Keys(file, FILE)).(*bufio.Writer) bio.WriteString(l.p) bio.WriteString(" ") - if p, ok := view["prefix"].(string); ok { + if p, ok := view[PREFIX].(string); ok { bio.WriteString(p) } bio.WriteString(l.l) bio.WriteString(" ") bio.WriteString(l.s) - if p, ok := view["suffix"].(string); ok { + if p, ok := view[SUFFIX].(string); ok { bio.WriteString(p) } bio.WriteString("\n") @@ -60,50 +60,71 @@ func (f *Frame) Close(m *ice.Message, arg ...string) bool { return true } +const ( + PREFIX = "prefix" + SUFFIX = "suffix" +) +const ( + GREEN = "green" + YELLOW = "yellow" + RED = "red" +) +const ( + WATCH = "watch" + BENCH = "bench" + ERROR = "error" + TRACE = "trace" +) +const ( + FILE = "file" + VIEW = "view" + SHOW = "show" +) + var Index = &ice.Context{Name: "log", Help: "日志模块", Configs: map[string]*ice.Config{ - "file": {Name: "file", Help: "日志文件", Value: kit.Dict( - "watch", kit.Dict("path", "var/log/watch.log", "list", []string{ + FILE: {Name: FILE, Help: "日志文件", Value: kit.Dict( + WATCH, kit.Dict(kit.MDB_PATH, path.Join(ice.VAR_LOG, "watch.log"), kit.MDB_LIST, []string{ ice.LOG_CREATE, ice.LOG_REMOVE, ice.LOG_INSERT, ice.LOG_DELETE, ice.LOG_SELECT, ice.LOG_MODIFY, ice.LOG_EXPORT, ice.LOG_IMPORT, }), - "bench", kit.Dict("path", "var/log/bench.log", "list", []string{}), - "error", kit.Dict("path", "var/log/error.log", "list", []string{ + BENCH, kit.Dict(kit.MDB_PATH, path.Join(ice.VAR_LOG, "bench.log"), kit.MDB_LIST, []string{}), + ERROR, kit.Dict(kit.MDB_PATH, path.Join(ice.VAR_LOG, "error.log"), kit.MDB_LIST, []string{ ice.LOG_WARN, ice.LOG_ERROR, }), - "trace", kit.Dict("path", "var/log/trace.log", "list", []string{}), + TRACE, kit.Dict(kit.MDB_PATH, path.Join(ice.VAR_LOG, "trace.log"), kit.MDB_LIST, []string{}), )}, - "view": {Name: "view", Help: "日志格式", Value: kit.Dict( - "green", kit.Dict("prefix", "\033[32m", "suffix", "\033[0m", "list", []string{ + VIEW: {Name: VIEW, Help: "日志格式", Value: kit.Dict( + GREEN, kit.Dict(PREFIX, "\033[32m", SUFFIX, "\033[0m", kit.MDB_LIST, []string{ ice.LOG_START, ice.LOG_SERVE, ice.LOG_CMDS, }), - "yellow", kit.Dict("prefix", "\033[33m", "suffix", "\033[0m", "list", []string{ + YELLOW, kit.Dict(PREFIX, "\033[33m", SUFFIX, "\033[0m", kit.MDB_LIST, []string{ ice.LOG_AUTH, ice.LOG_COST, }), - "red", kit.Dict("prefix", "\033[31m", "suffix", "\033[0m", "list", []string{ + RED, kit.Dict(PREFIX, "\033[31m", SUFFIX, "\033[0m", kit.MDB_LIST, []string{ ice.LOG_WARN, ice.LOG_CLOSE, }), )}, - "show": {Name: "show", Help: "日志分流", Value: kit.Dict()}, + SHOW: {Name: SHOW, Help: "日志分流", Value: kit.Dict()}, }, Commands: map[string]*ice.Command{ ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { - m.Confm("view", nil, func(key string, value map[string]interface{}) { - kit.Fetch(value["list"], func(index int, k string) { - m.Conf("show", kit.Keys(k, "view"), key) + m.Confm(VIEW, nil, func(key string, value map[string]interface{}) { + kit.Fetch(value[kit.MDB_LIST], func(index int, k string) { + m.Conf(SHOW, kit.Keys(k, VIEW), key) }) }) - m.Confm("file", nil, func(key string, value map[string]interface{}) { - kit.Fetch(value["list"], func(index int, k string) { - m.Conf("show", kit.Keys(k, "file"), key) + m.Confm(FILE, nil, func(key string, value map[string]interface{}) { + kit.Fetch(value[kit.MDB_LIST], func(index int, k string) { + m.Conf(SHOW, kit.Keys(k, FILE), key) }) // 日志文件 - if f, p, e := kit.Create(kit.Format(value["path"])); m.Assert(e) { + if f, p, e := kit.Create(kit.Format(value[kit.MDB_PATH])); m.Assert(e) { m.Cap(ice.CTX_STREAM, path.Base(p)) - value["file"] = bufio.NewWriter(f) + value[FILE] = bufio.NewWriter(f) m.Log_CREATE(kit.MDB_FILE, p) } }) diff --git a/base/nfs/cat.go b/base/nfs/cat.go index 13e241c1..10be0d8f 100644 --- a/base/nfs/cat.go +++ b/base/nfs/cat.go @@ -1,16 +1,16 @@ package nfs import ( - ice "github.com/shylinux/icebergs" - "github.com/shylinux/icebergs/base/aaa" - "github.com/shylinux/icebergs/base/mdb" - kit "github.com/shylinux/toolkits" - "bufio" "bytes" "os" "path" "strings" + + ice "github.com/shylinux/icebergs" + "github.com/shylinux/icebergs/base/aaa" + "github.com/shylinux/icebergs/base/mdb" + kit "github.com/shylinux/toolkits" ) func _cat_ext(name string) string { diff --git a/base/nfs/dir.go b/base/nfs/dir.go index fc538c53..212af533 100644 --- a/base/nfs/dir.go +++ b/base/nfs/dir.go @@ -155,8 +155,8 @@ func Dir(m *ice.Message, sort string) { const ( TYPE_ALL = "all" - TYPE_DIR = "dir" TYPE_CAT = "cat" + TYPE_DIR = "dir" TYPE_BOTH = "both" ) const ( @@ -185,9 +185,9 @@ func init() { mdb.UPLOAD: {Name: "upload", Help: "上传", Hand: func(m *ice.Message, arg ...string) { up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)) if p := path.Join(m.Option(kit.MDB_PATH), up[1]); m.Option(ice.MSG_USERPOD) == "" { - m.Cmdy("cache", "watch", up[0], p) + m.Cmdy("web.cache", "watch", up[0], p) } else { - m.Cmdy("spide", "dev", "save", p, "GET", kit.MergeURL2(m.Option(ice.MSG_USERWEB), "/share/cache/"+up[0])) + m.Cmdy("web.spide", "dev", "save", p, "GET", kit.MergeURL2(m.Option(ice.MSG_USERWEB), "/share/cache/"+up[0])) } }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { diff --git a/base/nfs/save.go b/base/nfs/save.go index 36eba5f8..c61a075a 100644 --- a/base/nfs/save.go +++ b/base/nfs/save.go @@ -1,13 +1,13 @@ package nfs import ( - ice "github.com/shylinux/icebergs" - kit "github.com/shylinux/toolkits" - "io" "os" "path" "strings" + + ice "github.com/shylinux/icebergs" + kit "github.com/shylinux/toolkits" ) func _save_file(m *ice.Message, name string, text ...string) { diff --git a/base/nfs/tail.go b/base/nfs/tail.go index eecf5b19..beda5563 100644 --- a/base/nfs/tail.go +++ b/base/nfs/tail.go @@ -1,13 +1,13 @@ package nfs import ( + "bufio" + "io" + ice "github.com/shylinux/icebergs" "github.com/shylinux/icebergs/base/cli" "github.com/shylinux/icebergs/base/mdb" kit "github.com/shylinux/toolkits" - - "bufio" - "io" ) func _tail_create(m *ice.Message, arg ...string) { @@ -38,23 +38,41 @@ const TAIL = "tail" func init() { Index.Merge(&ice.Context{ Configs: map[string]*ice.Config{ - TAIL: {Name: TAIL, Help: "跟踪", Value: kit.Data()}, + TAIL: {Name: TAIL, Help: "日志流", Value: kit.Data()}, }, Commands: map[string]*ice.Command{ - TAIL: {Name: "tail hash id auto create", Help: "跟踪", Action: map[string]*ice.Action{ + TAIL: {Name: "tail hash id limit offend auto prev next create", Help: "日志流", Action: map[string]*ice.Action{ mdb.CREATE: {Name: "create file name", Help: "创建", Hand: func(m *ice.Message, arg ...string) { _tail_create(m, arg...) }}, mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(mdb.DELETE, TAIL, "", mdb.HASH, kit.MDB_HASH, m.Option(kit.MDB_HASH)) }}, + "prev": {Name: "prev", Help: "上一页", Hand: func(m *ice.Message, arg ...string) { + offend := kit.Int(kit.Select("0", arg, 3)) + kit.Int(kit.Select("10", arg, 2)) + total := kit.Int(m.Conf(TAIL, kit.Keys(kit.MDB_HASH, arg[0], kit.MDB_META, kit.MDB_COUNT))) + if offend >= total { + offend = total - kit.Int(kit.Select("10", arg, 2)) + m.Toast("已经是最后一页啦!") + } + + m.Process("_rewrite", "offend", offend) + }}, + "next": {Name: "next", Help: "下一页", Hand: func(m *ice.Message, arg ...string) { + offend := kit.Int(kit.Select("0", arg, 3)) - kit.Int(kit.Select("10", arg, 2)) + if offend < 0 { + offend = 0 + m.Toast("已经是第一页啦!") + } + m.Process("_rewrite", "offend", offend) + }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { - m.Option(mdb.FIELDS, kit.Select("time,hash,count,name,file", kit.Select("time,id,file,text", mdb.DETAIL, len(arg) > 1), len(arg) > 0)) + m.Option(mdb.FIELDS, kit.Select("time,hash,count,name,file", kit.Select("time,id,file,text", mdb.DETAIL, len(arg) > 1 && arg[1] != ""), len(arg) > 0)) + m.Option("cache.limit", kit.Select("10", arg, 2)) + m.Option("cache.offend", kit.Select("0", arg, 3)) if m.Cmdy(mdb.SELECT, TAIL, "", mdb.ZONE, arg); len(arg) == 0 { m.PushAction(mdb.REMOVE) - } else if len(arg) == 1 { - m.Option(ice.MSG_CONTROL, ice.CONTROL_PAGE) } }}, }, diff --git a/base/nfs/trash.go b/base/nfs/trash.go index 71f91822..51f85b86 100644 --- a/base/nfs/trash.go +++ b/base/nfs/trash.go @@ -1,13 +1,13 @@ package nfs import ( + "os" + "path" + ice "github.com/shylinux/icebergs" "github.com/shylinux/icebergs/base/cli" "github.com/shylinux/icebergs/base/mdb" kit "github.com/shylinux/toolkits" - - "os" - "path" ) func _trash_create(m *ice.Message, name string) { @@ -25,7 +25,7 @@ func _trash_create(m *ice.Message, name string) { p := path.Join(m.Conf(TRASH, kit.META_PATH), h[:2], h) os.MkdirAll(path.Dir(p), ice.MOD_DIR) os.Rename(name, p) - m.Cmdy(mdb.INSERT, TRASH, "", mdb.LIST, kit.MDB_FILE, p, kit.MDB_FROM, name) + m.Cmdy(mdb.INSERT, TRASH, "", mdb.HASH, kit.MDB_FILE, p, kit.MDB_FROM, name) } } } @@ -35,17 +35,20 @@ const TRASH = "trash" func init() { Index.Merge(&ice.Context{ Configs: map[string]*ice.Config{ - TRASH: {Name: TRASH, Help: "删除", Value: kit.Data(kit.MDB_PATH, "var/trash")}, + TRASH: {Name: TRASH, Help: "回收站", Value: kit.Data( + kit.MDB_SHORT, kit.MDB_FROM, kit.MDB_PATH, ice.VAR_TRASH, + )}, }, Commands: map[string]*ice.Command{ - TRASH: {Name: "trash file auto", Help: "删除", Action: map[string]*ice.Action{ + TRASH: {Name: "trash file auto", Help: "回收站", Action: map[string]*ice.Action{ "recover": {Name: "recover", Help: "恢复", Hand: func(m *ice.Message, arg ...string) { os.Rename(m.Option(kit.MDB_FILE), m.Option(kit.MDB_FROM)) + m.Cmd(mdb.DELETE, TRASH, "", mdb.HASH, kit.MDB_HASH, m.Option(kit.MDB_HASH)) }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { if len(arg) == 0 { - m.Option(mdb.FIELDS, "time,id,file,from") - m.Cmdy(mdb.SELECT, TRASH, "", mdb.LIST) + m.Option(mdb.FIELDS, "time,hash,file,from") + m.Cmdy(mdb.SELECT, TRASH, "", mdb.HASH) m.PushAction("recover") return } diff --git a/base/ssh/channel.go b/base/ssh/channel.go index 3cc0aeb6..6061f74f 100644 --- a/base/ssh/channel.go +++ b/base/ssh/channel.go @@ -1,17 +1,17 @@ package ssh import ( + "io" + "net" + "os/exec" + "strings" + ice "github.com/shylinux/icebergs" "github.com/shylinux/icebergs/base/aaa" "github.com/shylinux/icebergs/base/mdb" "github.com/shylinux/icebergs/base/tcp" kit "github.com/shylinux/toolkits" "golang.org/x/crypto/ssh" - - "io" - "net" - "os/exec" - "strings" ) type Winsize struct{ Height, Width, x, y uint16 } diff --git a/base/ssh/connect.go b/base/ssh/connect.go index fe9c0dc3..c1ef746e 100644 --- a/base/ssh/connect.go +++ b/base/ssh/connect.go @@ -1,16 +1,6 @@ package ssh import ( - ice "github.com/shylinux/icebergs" - "github.com/shylinux/icebergs/base/aaa" - "github.com/shylinux/icebergs/base/mdb" - "github.com/shylinux/icebergs/base/nfs" - "github.com/shylinux/icebergs/base/tcp" - kit "github.com/shylinux/toolkits" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/terminal" - "encoding/json" "fmt" "io" @@ -19,6 +9,15 @@ import ( "path" "strings" "time" + + ice "github.com/shylinux/icebergs" + "github.com/shylinux/icebergs/base/aaa" + "github.com/shylinux/icebergs/base/mdb" + "github.com/shylinux/icebergs/base/nfs" + "github.com/shylinux/icebergs/base/tcp" + kit "github.com/shylinux/toolkits" + "golang.org/x/crypto/ssh" + "golang.org/x/crypto/ssh/terminal" ) func _ssh_tick(m *ice.Message, pw io.Writer) { diff --git a/base/ssh/service.go b/base/ssh/service.go index d9cf632e..8d9f3a76 100644 --- a/base/ssh/service.go +++ b/base/ssh/service.go @@ -1,14 +1,6 @@ package ssh import ( - ice "github.com/shylinux/icebergs" - "github.com/shylinux/icebergs/base/aaa" - "github.com/shylinux/icebergs/base/mdb" - "github.com/shylinux/icebergs/base/nfs" - "github.com/shylinux/icebergs/base/tcp" - kit "github.com/shylinux/toolkits" - "golang.org/x/crypto/ssh" - "bytes" "encoding/base64" "errors" @@ -17,6 +9,14 @@ import ( "os" "path" "strings" + + ice "github.com/shylinux/icebergs" + "github.com/shylinux/icebergs/base/aaa" + "github.com/shylinux/icebergs/base/mdb" + "github.com/shylinux/icebergs/base/nfs" + "github.com/shylinux/icebergs/base/tcp" + kit "github.com/shylinux/toolkits" + "golang.org/x/crypto/ssh" ) func _ssh_meta(conn ssh.ConnMetadata) map[string]string { diff --git a/base/ssh/session.go b/base/ssh/session.go index 6fbd1153..a6b2126f 100644 --- a/base/ssh/session.go +++ b/base/ssh/session.go @@ -1,6 +1,8 @@ package ssh import ( + "golang.org/x/crypto/ssh" + "io" "os" ice "github.com/shylinux/icebergs" @@ -8,10 +10,6 @@ import ( "github.com/shylinux/icebergs/base/mdb" "github.com/shylinux/icebergs/base/tcp" kit "github.com/shylinux/toolkits" - - "io" - - "golang.org/x/crypto/ssh" ) func _ssh_sess(m *ice.Message, h string, client *ssh.Client) (*ssh.Session, error) { @@ -87,8 +85,7 @@ func init() { m.Debug("%v %v", n, e) } }) - m.Sleep("300ms") - m.Cmdy(SESSION, m.Option(kit.MDB_HASH)) + m.ProcessRefresh("300ms") }}, "bind": {Name: "bind", Help: "绑定", Hand: func(m *ice.Message, arg ...string) { m.Richs(SESSION, "", m.Option(kit.MDB_HASH), func(key string, value map[string]interface{}) { diff --git a/base/ssh/ssh.go b/base/ssh/ssh.go index 9eb472ac..19ae8fbb 100644 --- a/base/ssh/ssh.go +++ b/base/ssh/ssh.go @@ -13,14 +13,16 @@ var Index = &ice.Context{Name: SSH, Help: "终端模块", Commands: map[string]* m.Load() m.Conf(SOURCE, kit.Keys(kit.MDB_HASH, STDIO, kit.MDB_META, kit.MDB_NAME), STDIO) m.Conf(SOURCE, kit.Keys(kit.MDB_HASH, STDIO, kit.MDB_META, kit.MDB_TIME), m.Time()) + + m.Richs(SERVICE, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) { + value = kit.GetMeta(value) + m.Cmd(SERVICE, tcp.LISTEN, tcp.PORT, value[tcp.PORT], value) + }) }}, ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { if _, ok := m.Target().Server().(*Frame); ok { m.Done(true) } - m.Richs(SERVICE, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) { - kit.Value(value, "meta.status", tcp.CLOSE) - }) m.Richs(CHANNEL, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) { kit.Value(value, "meta.status", tcp.CLOSE) }) diff --git a/base/ssh/ssh.shy b/base/ssh/ssh.shy index caa190c4..f008d912 100644 --- a/base/ssh/ssh.shy +++ b/base/ssh/ssh.shy @@ -5,9 +5,10 @@ refer ` 源码 https://github.com/openssh/openssh-portable ` -field "脚本" ssh.source - field "服务" ssh.service field "通道" ssh.channel + field "连接" ssh.connect field "会话" ssh.session +field "脚本" ssh.source + diff --git a/conf.go b/conf.go index c2c588c4..4c0e11f5 100644 --- a/conf.go +++ b/conf.go @@ -34,7 +34,9 @@ const ( // DIR PROTO_JS = "proto.js" FRAME_JS = "frame.js" + VAR_LOG = "var/log" VAR_CONF = "var/conf" + VAR_TRASH = "var/trash" ETC_MISS = "etc/miss.sh" ETC_INIT = "etc/init.shy" ETC_EXIT = "etc/exit.shy" diff --git a/logs.go b/logs.go index faafb71d..58846001 100644 --- a/logs.go +++ b/logs.go @@ -1,11 +1,11 @@ package ice import ( - kit "github.com/shylinux/toolkits" - log "github.com/shylinux/toolkits/logs" - "fmt" "strings" + + kit "github.com/shylinux/toolkits" + log "github.com/shylinux/toolkits/logs" ) var OK = "ok"