- update config

master v1.0.96
李光春 2 years ago
parent e4858bb504
commit d7a75aaac3

@ -31,17 +31,15 @@ type Client struct {
gormClient *dorm.GormClient // 数据库
zapLog *golog.ZapLog // 日志服务
config struct {
systemHostName string // 主机名
systemInsideIp string // 内网ip
systemOs string // 系统类型
systemArch string // 系统架构
systemCpuQuantity int // cpu核数
goVersion string // go版本
sdkVersion string // sdk版本
systemMacAddrS string // Mac地址
systemOutsideIp string // 外网ip
debug bool // 日志开关
jsonStatus bool // json状态
systemHostName string // 主机名
systemInsideIp string // 内网ip
systemOs string // 系统类型
systemArch string // 系统架构
goVersion string // go版本
sdkVersion string // sdk版本
systemOutsideIp string // 外网ip
debug bool // 日志开关
jsonStatus bool // json状态
}
cache struct {
redisClient *dorm.RedisClient // 数据库

@ -2,8 +2,8 @@ package gojobs
import (
"context"
"go.dtapp.net/goarray"
"go.dtapp.net/goip"
"os"
"runtime"
)
@ -11,8 +11,8 @@ func (c *Client) setConfig(ctx context.Context) {
c.config.sdkVersion = Version
c.config.systemOs = runtime.GOOS
c.config.systemArch = runtime.GOARCH
c.config.systemCpuQuantity = runtime.GOMAXPROCS(0)
c.config.goVersion = runtime.Version()
c.config.systemMacAddrS = goarray.TurnString(goip.GetMacAddr(ctx))
c.config.systemInsideIp = goip.GetInsideIp(ctx)
hostname, _ := os.Hostname()
c.config.systemHostName = hostname
}

@ -1,6 +1,6 @@
package gojobs
const (
Version = "1.0.95"
Version = "1.0.96"
SpecifyIpNull = "0.0.0.0"
)

@ -7,7 +7,6 @@ require (
github.com/jasonlvhit/gocron v0.0.1
github.com/robfig/cron/v3 v3.0.1
go.dtapp.net/dorm v1.0.38
go.dtapp.net/goarray v1.0.1
go.dtapp.net/goip v1.0.34
go.dtapp.net/golog v1.0.82
go.dtapp.net/gostring v1.0.10

@ -518,8 +518,6 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
go.dtapp.net/dorm v1.0.38 h1:9OgWY5bnar6D0Xdho62xn7RluXJNe8i7Kz/IeSUObF4=
go.dtapp.net/dorm v1.0.38/go.mod h1:z9ksZ4Y0HHH0odjEiG57d90/ZUBM51qXEWJC8fS+dEM=
go.dtapp.net/goarray v1.0.1 h1:cHNHaJ2MFcuJPA1WKU2PM1EUZShS1vQqEH7n6YXsQVU=
go.dtapp.net/goarray v1.0.1/go.mod h1:/MPhlFCAhQyeNV1M0v1PAOOX33Sg705fVjUgMO12IBQ=
go.dtapp.net/goip v1.0.34 h1:aW2CuPpQwcDOJiyx/gHbvrha3/x+poFRpDxsLtO4EVw=
go.dtapp.net/goip v1.0.34/go.mod h1:EctL6B8ue/kZKPr+kKZPU6YTTpNhihane9BHHffwo6Q=
go.dtapp.net/golog v1.0.82 h1:VSWaZLYjmtnI7h6cp9HGXrp+CVW+zS7Wii5kGd9sY88=

@ -1,17 +0,0 @@
kind: pipeline
type: docker
name: clone
steps:
- name: Test
image: golang:1.18
commands:
- go env -w GO111MODULE=on
- go env -w GOPROXY=https://goproxy.cn,direct
- go test -v ./...
- name: Benchmark
image: golang:1.18
commands:
- go env -w GO111MODULE=on
- go env -w GOPROXY=https://goproxy.cn,direct
- go test -bench=. -benchmem

@ -1,8 +0,0 @@
.env
.git
.svn
.idea
.vscode
*.log
gomod.sh
/vendor/

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2018 李光春
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,17 +0,0 @@
<h1>
<a href="https://www.dtapp.net/">Golang Array</a>
</h1>
📦 Golang Array
[comment]: <> (go)
[![godoc](https://pkg.go.dev/badge/go.dtapp.net/goarray?status.svg)](https://pkg.go.dev/go.dtapp.net/goarray)
[![goproxy.cn](https://goproxy.cn/stats/go.dtapp.net/goarray/badges/download-count.svg)](https://goproxy.cn/stats/go.dtapp.net/goarray)
[![goreportcard.com](https://goreportcard.com/badge/go.dtapp.net/goarray)](https://goreportcard.com/report/go.dtapp.net/goarray)
[![deps.dev](https://img.shields.io/badge/deps-go-red.svg)](https://deps.dev/go/go.dtapp.net%2Fgoarray)
#### 安装
```go
go get -v -u go.dtapp.net/goarray
```

@ -1,31 +0,0 @@
package goarray
func Grouping() {
}
// TurnString []string 转 string
func TurnString(ss []string) (s string) {
sl := len(ss)
for k, v := range ss {
if k+1 == sl {
s = s + v
} else {
s = s + v + ","
}
}
return s
}
// RemoveDuplicateElement 去重
func RemoveDuplicateElement[T string | int | int16 | int32](ss []T) []T {
result := make([]T, 0, len(ss))
temp := map[T]struct{}{}
for _, item := range ss {
if _, ok := temp[item]; !ok {
temp[item] = struct{}{}
result = append(result, item)
}
}
return result
}

@ -1,3 +0,0 @@
package goarray
const Version = "1.0.1"

@ -257,9 +257,6 @@ github.com/youmark/pkcs8
# go.dtapp.net/dorm v1.0.38
## explicit; go 1.19
go.dtapp.net/dorm
# go.dtapp.net/goarray v1.0.1
## explicit; go 1.18
go.dtapp.net/goarray
# go.dtapp.net/goip v1.0.34
## explicit; go 1.19
go.dtapp.net/goip

Loading…
Cancel
Save