1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

opt import

This commit is contained in:
shylinux 2019-07-28 09:33:48 +08:00
parent c6d9295311
commit bbb8570de3
12 changed files with 33 additions and 37 deletions

View File

@ -1,21 +1,21 @@
package cli
import (
"contexts/ctx"
"toolkit"
"bufio"
"bytes"
"contexts/ctx"
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"os/user"
"path"
"reflect"
"toolkit"
"fmt"
"os"
"plugin"
"reflect"
"runtime"
"strconv"
"strings"

View File

@ -4,5 +4,5 @@ var version = struct {
host string
self int
}{
"2019-07-27 20:28:57", "ZYB-20190522USI", 295,
"2019-07-28 08:54:43", "com", 220,
}

View File

@ -1,17 +1,17 @@
package ctx
import (
"toolkit"
"encoding/json"
"fmt"
"regexp"
"strconv"
"strings"
"math/rand"
"os"
"regexp"
"sort"
"strconv"
"strings"
"time"
"toolkit"
)
type CTX struct {

View File

@ -2,12 +2,12 @@ package gdb
import (
"contexts/ctx"
"time"
"toolkit"
"os"
"os/signal"
"syscall"
"time"
)
type GDB struct {

View File

@ -2,10 +2,11 @@ package lex
import (
"contexts/ctx"
"toolkit"
"fmt"
"strconv"
"strings"
"toolkit"
)
type Seed struct {

View File

@ -2,11 +2,11 @@ package log
import (
"contexts/ctx"
"path"
"toolkit"
"fmt"
"os"
"path"
)
type LOG struct {

View File

@ -1,13 +1,11 @@
package nfs
import (
"github.com/skip2/go-qrcode"
"contexts/ctx"
"crypto/md5"
"toolkit"
"bufio"
"crypto/md5"
"crypto/sha1"
"encoding/csv"
"encoding/hex"
@ -1022,15 +1020,6 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心",
w.Flush()
}
case strings.HasSuffix(arg[0], ".png"):
if data == nil {
data = strings.Join(arg[1:], "")
}
if qr, e := qrcode.New(kit.Format(data), qrcode.Medium); m.Assert(e) {
m.Assert(qr.Write(256, f))
}
default:
f.WriteString(kit.Format(m.Meta["result"]))
}

View File

@ -1,13 +1,13 @@
package nfs
import (
"github.com/nsf/termbox-go"
"contexts/ctx"
"toolkit"
"fmt"
"strings"
"github.com/nsf/termbox-go"
"time"
)

View File

@ -2,12 +2,13 @@ package ssh
import (
"contexts/ctx"
"toolkit"
"encoding/hex"
"io"
"os"
"path"
"strings"
"toolkit"
)
type SSH struct {
@ -483,6 +484,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
case "serve":
m.Conf("runtime", "work.serve", true)
m.Conf("runtime", "work.route", m.Conf("runtime", "node.route"))
m.Conf("runtime", "work.name", m.Conf("runtime", "user.name"))
m.Conf("work", m.Conf("runtime", "user.name"), map[string]interface{}{
"create_time": m.Time(), "user": m.Cmd("ssh.user", "init").Append("user.route"),
})

View File

@ -2,6 +2,8 @@ package tcp
import (
"contexts/ctx"
"toolkit"
"crypto/tls"
"fmt"
"io"
@ -10,7 +12,6 @@ import (
"strings"
"sync/atomic"
"time"
"toolkit"
)
type TCP struct {

View File

@ -1,12 +1,15 @@
package web
import (
"bytes"
"contexts/ctx"
"encoding/json"
"fmt"
"github.com/go-cas/cas"
"github.com/skip2/go-qrcode"
"contexts/ctx"
"toolkit"
"bytes"
"encoding/json"
"fmt"
"html/template"
"io"
"io/ioutil"
@ -18,7 +21,6 @@ import (
"path/filepath"
"strconv"
"strings"
"toolkit"
)
type MUX interface {

View File

@ -2,12 +2,13 @@ package yac
import (
"contexts/ctx"
"toolkit"
"fmt"
"os"
"regexp"
"strconv"
"strings"
"toolkit"
)
type Seed struct {