mirror of
https://shylinux.com/x/ContextOS
synced 2025-06-27 02:17:31 +08:00
opt import
This commit is contained in:
parent
c6d9295311
commit
bbb8570de3
@ -1,21 +1,21 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"contexts/ctx"
|
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"os/user"
|
"os/user"
|
||||||
"path"
|
"path"
|
||||||
"reflect"
|
|
||||||
"toolkit"
|
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"plugin"
|
"plugin"
|
||||||
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -4,5 +4,5 @@ var version = struct {
|
|||||||
host string
|
host string
|
||||||
self int
|
self int
|
||||||
}{
|
}{
|
||||||
"2019-07-27 20:28:57", "ZYB-20190522USI", 295,
|
"2019-07-28 08:54:43", "com", 220,
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
package ctx
|
package ctx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type CTX struct {
|
type CTX struct {
|
||||||
|
@ -2,12 +2,12 @@ package gdb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
"time"
|
|
||||||
"toolkit"
|
"toolkit"
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GDB struct {
|
type GDB struct {
|
||||||
|
@ -2,10 +2,11 @@ package lex
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Seed struct {
|
type Seed struct {
|
||||||
|
@ -2,11 +2,11 @@ package log
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
"path"
|
|
||||||
"toolkit"
|
"toolkit"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LOG struct {
|
type LOG struct {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package nfs
|
package nfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/skip2/go-qrcode"
|
|
||||||
|
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
"crypto/md5"
|
|
||||||
"toolkit"
|
"toolkit"
|
||||||
|
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"crypto/md5"
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
@ -1022,15 +1020,6 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心",
|
|||||||
w.Flush()
|
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:
|
default:
|
||||||
f.WriteString(kit.Format(m.Meta["result"]))
|
f.WriteString(kit.Format(m.Meta["result"]))
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package nfs
|
package nfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/nsf/termbox-go"
|
||||||
|
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
"toolkit"
|
"toolkit"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nsf/termbox-go"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,12 +2,13 @@ package ssh
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type SSH struct {
|
type SSH struct {
|
||||||
@ -483,6 +484,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
|||||||
case "serve":
|
case "serve":
|
||||||
m.Conf("runtime", "work.serve", true)
|
m.Conf("runtime", "work.serve", true)
|
||||||
m.Conf("runtime", "work.route", m.Conf("runtime", "node.route"))
|
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{}{
|
m.Conf("work", m.Conf("runtime", "user.name"), map[string]interface{}{
|
||||||
"create_time": m.Time(), "user": m.Cmd("ssh.user", "init").Append("user.route"),
|
"create_time": m.Time(), "user": m.Cmd("ssh.user", "init").Append("user.route"),
|
||||||
})
|
})
|
||||||
|
@ -2,6 +2,8 @@ package tcp
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@ -10,7 +12,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TCP struct {
|
type TCP struct {
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"contexts/ctx"
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"github.com/go-cas/cas"
|
"github.com/go-cas/cas"
|
||||||
"github.com/skip2/go-qrcode"
|
"github.com/skip2/go-qrcode"
|
||||||
|
|
||||||
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@ -18,7 +21,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MUX interface {
|
type MUX interface {
|
||||||
|
@ -2,12 +2,13 @@ package yac
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"contexts/ctx"
|
"contexts/ctx"
|
||||||
|
"toolkit"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"toolkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Seed struct {
|
type Seed struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user