Common utility packages leveraged by other repos.
go get mosn.io/pkg
Common packages used by other repos.
License: Apache License 2.0
Here's the Weekly Digest for mosn/pkg:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository mosn/pkg to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
我最近使用到了pkg/blob/master/utils/dup_arm64.go里的Dup方法,提示Dup3方法找不到,错误信息如下:
# mosn.io/pkg/utils
../../go/pkg/mod/github.com/wenxuwan/[email protected]/utils/dup_arm64.go:8:9: undefined: syscall.Dup3
我的电脑是mac m1,golang版本是go1.16.3.darwin-arm64,go env如下:
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/mrbinary/Library/Caches/go-build"
GOENV="/Users/mrbinary/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/mrbinary/go/pkg/mod"
GONOPROXY="gitlab.com"
GONOSUMDB="gitlab.com"
GOOS="darwin"
GOPATH="/Users/mrbinary/go"
GOPRIVATE="github.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.16.3"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ny/w9t1brsx7hq3gjc0tlfy6yyc0000gn/T/go-build2969965340=/tmp/go-build -gno-record-gcc-switches -fno-common"
Lines 41 to 60 in e3528ea
这里的 GoWithRecover 是不是拆成两个函数比较好,我在使用 errgroup 需要传入裸函数,这样拆分可以使用到 recover 机制,同时是否开启 goroutine 交给用户决定。
func GoWithRecover(handler func(), recoverHandler func(r interface{})) {
go func() {
WithRecover(handler, recoverHandler)
}()
}
func WithRecover(handler func(), recoverHandler func(r interface{})) {
defer func() {
if r := recover(); r != nil {
recoverLogger(os.Stderr, r)
if recoverHandler != nil {
go func() {
defer func() {
if p := recover(); p != nil {
recoverLogger(os.Stderr, p)
}
}()
recoverHandler(r)
}()
}
}
}()
handler()
}
Here's the Weekly Digest for mosn/pkg:
Last week, no issues were created.
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository mosn/pkg to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
通过 InitGlobalRoller 更新 roller 从 log.Roller{MaxTime: 24 * 60 * 60} 到 log.Roller{MaxSize: 100, MaxAge: 7, MaxBackups: 10} 发生 panic。
目前只支持:修改 MaxSize 字段吗?而且 MaxSize 这个字段不可以修改为0。
Hi
Now the log rotate function not configurable, may be should support user define own rotate function.
In our platform a script will find the file with format mosn_2020-xx-xx:14:00:00.log and will delete them period. So i need own rotate function to rename the file with our format.
fasthttp implements trailing headers as a part of the http request and response headers objects. To ensure we can use these without relying on fasthttp API, we need a few more functions, which I'm happy to implement after #65 is in. I need this to help support the new http-wasm host, which has glitches both in trailers and also multiple header values.
cc @taoyuanyuan I'll backfill unit tests and polish up stuff, but probably this should be done separate from the version bump
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.