mirror of
https://github.com/number571/go-peer.git
synced 2026-09-12 11:40:01 +05:00
update
This commit is contained in:
parent
2109f7613a
commit
2b5d211e72
12
Makefile
12
Makefile
@ -16,7 +16,7 @@ _GO_TEST_LIST=\
|
||||
grep -v /examples/ | \
|
||||
grep -v /vendor/
|
||||
|
||||
.PHONY: default clean go-fmt-vet \
|
||||
.PHONY: default go-fmt-vet \
|
||||
lint-run test-run \
|
||||
test-coverage test-coverage-view test-coverage-treemap test-coverage-badge \
|
||||
git-status git-push \
|
||||
@ -24,10 +24,6 @@ _GO_TEST_LIST=\
|
||||
|
||||
default: lint-run test-run
|
||||
|
||||
clean:
|
||||
make -C ./bin clean
|
||||
make -C ./cmd clean
|
||||
|
||||
go-fmt-vet:
|
||||
go fmt ./...
|
||||
go vet ./...
|
||||
@ -35,13 +31,13 @@ go-fmt-vet:
|
||||
### INSTALL
|
||||
|
||||
install-deps:
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.0
|
||||
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2
|
||||
go install github.com/nikolaydubina/go-cover-treemap@v1.4.2
|
||||
|
||||
### LINT
|
||||
|
||||
lint-run: clean go-fmt-vet
|
||||
golangci-lint run -E "gosec,unconvert,gosimple,goconst,gocyclo,err113,ineffassign,unparam,unused,bodyclose,noctx,perfsprint,prealloc,gocritic,govet,revive,staticcheck,errcheck,errorlint,nestif,maintidx"
|
||||
lint-run: go-fmt-vet
|
||||
golangci-lint run -E "gosec,unconvert,goconst,gocyclo,err113,ineffassign,unparam,unused,bodyclose,noctx,perfsprint,prealloc,gocritic,govet,staticcheck,errcheck,errorlint,nestif,maintidx"
|
||||
|
||||
### TEST
|
||||
# example run: make test-run N=10
|
||||
|
||||
@ -101,7 +101,7 @@ All cmd programs are compiled for {`amd64`, `arm64`} ARCH and {`windows`, `linux
|
||||
|
||||
There are a number of dependencies that represent separate applications for providing additional information about the quality of the code. These applications are not entered into the project, but are loaded via the `make install-deps` command. The list of applications is as follows:
|
||||
|
||||
1. golangci-lint [github.com/golangci/golangci-lint/cmd/golangci-lintv1.60.0](https://github.com/golangci/golangci-lint/tree/v1.60.0)
|
||||
1. golangci-lint [github.com/golangci/golangci-lint@v2.1.2](https://github.com/golangci/golangci-lint/tree/v2.1.2)
|
||||
2. go-cover-treemap [github.com/nikolaydubina/go-cover-treemap@v1.4.2](https://github.com/nikolaydubina/go-cover-treemap/tree/v1.4.2)
|
||||
|
||||
## Theoretical works
|
||||
|
||||
3
bin/.gitignore
vendored
3
bin/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
!Makefile
|
||||
@ -1,6 +0,0 @@
|
||||
.PHONY: default remove-std clean
|
||||
default: clean
|
||||
clean:
|
||||
ls | grep -xv ".gitignore" | grep -xv "Makefile" | xargs rm | true
|
||||
remove-std:
|
||||
ls | grep -xv ".gitignore" | grep -xv "Makefile" | grep -xv -E ".*_.*_.*" | xargs rm
|
||||
@ -1,3 +0,0 @@
|
||||
package build
|
||||
|
||||
const CVersion = "v1.7.11~"
|
||||
@ -1,5 +0,0 @@
|
||||
package build
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNothing(_ *testing.T) {}
|
||||
@ -1,58 +0,0 @@
|
||||
package gopeer
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/number571/go-peer/build"
|
||||
)
|
||||
|
||||
var (
|
||||
//go:embed CHANGELOG.md
|
||||
tgCHANGELOG string
|
||||
)
|
||||
|
||||
func TestGoPeerVersion(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
re := regexp.MustCompile(`##\s+(v\d+\.\d+\.\d+~?)\s+`)
|
||||
match := re.FindAllStringSubmatch(tgCHANGELOG, -1)
|
||||
if len(match) < 2 {
|
||||
t.Error("versions not found")
|
||||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(build.CVersion, "~") {
|
||||
if match[0][1] != build.CVersion {
|
||||
t.Error("the versions do not match")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// current version is always previous version in the changelog
|
||||
if match[1][1] != build.CVersion {
|
||||
t.Error("the versions do not match")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if match[0][1] == match[1][1] {
|
||||
t.Error("the same versions inline")
|
||||
return
|
||||
}
|
||||
|
||||
for i := 0; i < len(match); i++ {
|
||||
for j := i + 1; j < len(match)-1; j++ {
|
||||
if match[i][1] == match[j][1] {
|
||||
t.Errorf("found the same versions (i=%d, j=%d)", i, j)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Count(tgCHANGELOG, "*??? ??, ????*") != 1 {
|
||||
t.Error("is there no new version or more than one new version?")
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
.PHONY: default build clean
|
||||
|
||||
default: build
|
||||
build:
|
||||
make -C ./tools build
|
||||
clean:
|
||||
make -C ./tools clean
|
||||
@ -1,9 +0,0 @@
|
||||
.PHONY: default build clean
|
||||
|
||||
default: build
|
||||
build:
|
||||
make -C ./keygen build
|
||||
make -C ./pmanager build
|
||||
clean:
|
||||
make -C ./keygen clean
|
||||
make -C ./pmanager clean
|
||||
2
cmd/tools/keygen/.gitignore
vendored
2
cmd/tools/keygen/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.key
|
||||
tkeygen
|
||||
@ -1,18 +0,0 @@
|
||||
GC=go build
|
||||
ROOPATH=../../..
|
||||
BINPATH=$(ROOPATH)/bin
|
||||
|
||||
.PHONY: default build clean
|
||||
default: build
|
||||
build:
|
||||
$(GC) -o $(BINPATH)/tkeygen . # main
|
||||
|
||||
for arch in amd64 arm64; \
|
||||
do \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=$${arch} go build -o $(BINPATH)/tkeygen_$${arch}_linux .; \
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=$${arch} go build -o $(BINPATH)/tkeygen_$${arch}_windows.exe .; \
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=$${arch} go build -o $(BINPATH)/tkeygen_$${arch}_darwin .; \
|
||||
done;
|
||||
clean:
|
||||
rm -f *.key
|
||||
rm -f tkeygen $(BINPATH)/tkeygen $(BINPATH)/tkeygen_*
|
||||
@ -1,15 +0,0 @@
|
||||
# Keygen
|
||||
|
||||
> Asymmetric key generator
|
||||
|
||||
```bash
|
||||
usage:
|
||||
go run . [-seed]
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
go run . -seed
|
||||
<priv-key-seed>
|
||||
```
|
||||
@ -1,90 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/number571/go-peer/pkg/crypto/asymmetric"
|
||||
"github.com/number571/go-peer/pkg/crypto/random"
|
||||
"github.com/number571/go-peer/pkg/encoding"
|
||||
)
|
||||
|
||||
func main() {
|
||||
seed := flag.Bool("seed", false, "set seed private key")
|
||||
flag.Parse()
|
||||
|
||||
seedBytes := random.NewRandom().GetBytes(asymmetric.CKeySeedSize)
|
||||
if *seed {
|
||||
seedBytes = encoding.HexDecode(readUntilEOL())
|
||||
if len(seedBytes) != asymmetric.CKeySeedSize {
|
||||
panic("len(seedBytes) != asymmetric.CKeySeedSize")
|
||||
}
|
||||
}
|
||||
|
||||
priv := asymmetric.NewPrivKeyFromSeed(seedBytes)
|
||||
if err := os.WriteFile("seed.key", []byte(encoding.HexEncode(seedBytes)), 0o600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := os.WriteFile("priv.key", []byte(priv.ToString()), 0o600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := os.WriteFile("pub.key", []byte(priv.GetPubKey().ToString()), 0o600); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func readUntilEOL() string {
|
||||
var (
|
||||
p = make([]byte, 0, 256)
|
||||
b = make([]byte, 1)
|
||||
)
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
res, _, err := bufio.NewReader(os.Stdin).ReadLine()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return string(res)
|
||||
}
|
||||
|
||||
if err := exec.Command("stty", "-F", "/dev/tty", "cbreak", "min", "1").Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := exec.Command("stty", "-F", "/dev/tty", "-echo").Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer func() { _ = exec.Command("stty", "-F", "/dev/tty", "echo").Run() }()
|
||||
|
||||
for {
|
||||
if _, err := os.Stdin.Read(b); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if b[0] == '\n' { // <enter>
|
||||
fmt.Println()
|
||||
break
|
||||
}
|
||||
if b[0] == 127 { // <backspace>
|
||||
if len(p) == 0 {
|
||||
continue
|
||||
}
|
||||
fmt.Print("\r")
|
||||
for i := 0; i < len(p); i++ {
|
||||
fmt.Print(" ")
|
||||
}
|
||||
fmt.Print("\r")
|
||||
for i := 0; i < len(p)-1; i++ {
|
||||
fmt.Print("*")
|
||||
}
|
||||
p = p[:len(p)-1]
|
||||
continue
|
||||
}
|
||||
fmt.Print("*")
|
||||
p = append(p, b[0])
|
||||
}
|
||||
|
||||
return string(p)
|
||||
}
|
||||
1
cmd/tools/pmanager/.gitignore
vendored
1
cmd/tools/pmanager/.gitignore
vendored
@ -1 +0,0 @@
|
||||
tpmanager
|
||||
@ -1,17 +0,0 @@
|
||||
GC=go build
|
||||
ROOPATH=../../..
|
||||
BINPATH=$(ROOPATH)/bin
|
||||
|
||||
.PHONY: default build
|
||||
default: build
|
||||
build:
|
||||
$(GC) -o $(BINPATH)/tpmanager . # main
|
||||
|
||||
for arch in amd64 arm64; \
|
||||
do \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=$${arch} go build -o $(BINPATH)/tpmanager_$${arch}_linux .; \
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=$${arch} go build -o $(BINPATH)/tpmanager_$${arch}_windows.exe .; \
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=$${arch} go build -o $(BINPATH)/tpmanager_$${arch}_darwin .; \
|
||||
done;
|
||||
clean:
|
||||
rm -f tpmanager $(BINPATH)/tpmanager $(BINPATH)/tpmanager_*
|
||||
@ -1,20 +0,0 @@
|
||||
# PManager
|
||||
|
||||
> Stateless password manager
|
||||
|
||||
```bash
|
||||
usage:
|
||||
./main -salt=[service-name] -work=[diff-size]
|
||||
stdin:
|
||||
[master-key]EOL
|
||||
```
|
||||
|
||||
EOL - End of Line (Enter)
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
$ go run . -salt="service-name" -work=24
|
||||
master-key
|
||||
J64mESAVm2o-8q6nWaywsoQbQvn8pf7U74O-Vr9HwSDu
|
||||
```
|
||||
@ -1,80 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/base64"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/number571/go-peer/pkg/crypto/keybuilder"
|
||||
)
|
||||
|
||||
const (
|
||||
cKeySize = 33 // bytes
|
||||
)
|
||||
|
||||
func main() {
|
||||
saltParam := flag.String("salt", "_salt_", "default salt value")
|
||||
workParam := flag.Uint("work", 24, "default work value")
|
||||
flag.Parse()
|
||||
|
||||
keyBuilder := keybuilder.NewKeyBuilder(1<<(*workParam), []byte(*saltParam))
|
||||
gotPassword := keyBuilder.Build(readUntilEOL(), cKeySize)
|
||||
|
||||
fmt.Println(base64.URLEncoding.EncodeToString(gotPassword))
|
||||
}
|
||||
|
||||
func readUntilEOL() string {
|
||||
var (
|
||||
p = make([]byte, 0, 256)
|
||||
b = make([]byte, 1)
|
||||
)
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
res, _, err := bufio.NewReader(os.Stdin).ReadLine()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return string(res)
|
||||
}
|
||||
|
||||
if err := exec.Command("stty", "-F", "/dev/tty", "cbreak", "min", "1").Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := exec.Command("stty", "-F", "/dev/tty", "-echo").Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer func() { _ = exec.Command("stty", "-F", "/dev/tty", "echo").Run() }()
|
||||
|
||||
for {
|
||||
if _, err := os.Stdin.Read(b); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if b[0] == '\n' { // <enter>
|
||||
fmt.Println()
|
||||
break
|
||||
}
|
||||
if b[0] == 127 { // <backspace>
|
||||
if len(p) == 0 {
|
||||
continue
|
||||
}
|
||||
fmt.Print("\r")
|
||||
for i := 0; i < len(p); i++ {
|
||||
fmt.Print(" ")
|
||||
}
|
||||
fmt.Print("\r")
|
||||
for i := 0; i < len(p)-1; i++ {
|
||||
fmt.Print("*")
|
||||
}
|
||||
p = p[:len(p)-1]
|
||||
continue
|
||||
}
|
||||
fmt.Print("*")
|
||||
p = append(p, b[0])
|
||||
}
|
||||
|
||||
return string(p)
|
||||
}
|
||||
@ -182,7 +182,7 @@ func (p *sNode) FetchPayload(
|
||||
pRecv asymmetric.IPubKey,
|
||||
pPld payload.IPayload32,
|
||||
) ([]byte, error) {
|
||||
headAction := sAction(random.NewRandom().GetUint64())
|
||||
headAction := sAction(random.NewRandom().GetUint64()) //nolint:gosec
|
||||
actionKey := newActionKey(pRecv, headAction)
|
||||
|
||||
p.setAction(actionKey)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package anonymity
|
||||
|
||||
import (
|
||||
@ -387,7 +387,7 @@ func TestHandleWrapper(t *testing.T) {
|
||||
node.HandleFunc(
|
||||
111,
|
||||
func(_ context.Context, _ INode, _ asymmetric.IPubKey, _ []byte) ([]byte, error) {
|
||||
return nil, errors.New("some error")
|
||||
return nil, errors.New("some error") //nolint:err113
|
||||
},
|
||||
)
|
||||
|
||||
@ -451,7 +451,7 @@ func TestHandleWrapper(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
node.fKVDatavase.Close()
|
||||
_ = node.fKVDatavase.Close()
|
||||
netMsg41 := node.testNewNetworkMessage(sett, msg4)
|
||||
if err := handler(ctx, netMsg41); err == nil {
|
||||
t.Error("got success code with closed database")
|
||||
@ -759,14 +759,14 @@ func testRunNode(ctx context.Context, timeWait time.Duration, addr string, typeD
|
||||
|
||||
func testFreeNodes(nodes []INode, typeDB int) {
|
||||
for _, node := range nodes {
|
||||
node.GetKVDatabase().Close()
|
||||
_ = node.GetKVDatabase().Close()
|
||||
}
|
||||
testDeleteDB(typeDB)
|
||||
}
|
||||
|
||||
func testDeleteDB(typeDB int) {
|
||||
for i := 0; i < 5; i++ {
|
||||
os.RemoveAll(fmt.Sprintf(tcPathDBTemplate, typeDB, i))
|
||||
_ = os.RemoveAll(fmt.Sprintf(tcPathDBTemplate, typeDB, i))
|
||||
}
|
||||
}
|
||||
|
||||
@ -783,6 +783,6 @@ func (p *sNode) testNewNetworkMessage(pSett layer1.IConstructSettings, pMsgBytes
|
||||
type tsDatabase struct{}
|
||||
|
||||
func (p *tsDatabase) Get([]byte) ([]byte, error) { return nil, database.ErrNotFound }
|
||||
func (p *tsDatabase) Set([]byte, []byte) error { return errors.New("some error") }
|
||||
func (p *tsDatabase) Set([]byte, []byte) error { return errors.New("some error") } //nolint:err113
|
||||
func (p *tsDatabase) Del([]byte) error { return nil }
|
||||
func (p *tsDatabase) Close() error { return nil }
|
||||
|
||||
@ -35,7 +35,7 @@ func runClientNode() anonymity.INode {
|
||||
network, node := newNode("cnode", "")
|
||||
|
||||
go func() { _ = node.Run(ctx) }()
|
||||
network.AddConnection(ctx, nodeAddress)
|
||||
_ = network.AddConnection(ctx, nodeAddress)
|
||||
|
||||
return node
|
||||
}
|
||||
@ -46,7 +46,7 @@ func runServiceNode() anonymity.INode {
|
||||
node.HandleFunc(
|
||||
nodeRouter,
|
||||
func(_ context.Context, _ anonymity.INode, _ asymmetric.IPubKey, b []byte) ([]byte, error) {
|
||||
return []byte(fmt.Sprintf("echo: %s", string(b))), nil
|
||||
return []byte("echo: " + string(b)), nil
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ func runClientNode() anonymity.INode {
|
||||
node.HandleFunc(nodeRouter, handler)
|
||||
|
||||
go func() { _ = node.Run(ctx) }()
|
||||
network.AddConnection(ctx, nodeAddress)
|
||||
_ = network.AddConnection(ctx, nodeAddress)
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
@ -24,11 +24,11 @@ func joinHead(pAction iAction, pRoute uint32) iHead {
|
||||
}
|
||||
|
||||
func (p sHead) getRoute() uint32 {
|
||||
return uint32(p & 0xFFFFFFFF)
|
||||
return uint32(p & 0xFFFFFFFF) //nolint:gosec
|
||||
}
|
||||
|
||||
func (p sHead) getAction() iAction {
|
||||
return sAction(p >> 32)
|
||||
return sAction(p >> 32) //nolint:gosec
|
||||
}
|
||||
|
||||
func (p sHead) uint64() uint64 {
|
||||
|
||||
@ -81,7 +81,7 @@ func (p *sLogger) WithPubKey(pPubKey asymmetric.IPubKey) ILogBuilder {
|
||||
}
|
||||
|
||||
func (p *sLogger) WithSize(pSize int) ILogBuilder {
|
||||
p.fSize = uint64(pSize)
|
||||
p.fSize = uint64(pSize) //nolint:gosec
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ func (p *sQBProblemProcessor) runMainPoolFiller(pCtx context.Context, pCancel fu
|
||||
case <-pCtx.Done():
|
||||
return
|
||||
case <-time.After(p.fSettings.GetQueuePeriod()):
|
||||
break // next consumer
|
||||
continue
|
||||
case msg := <-p.fMainPool.fRawQueue[i]:
|
||||
if err := p.pushMessage(pCtx, p.fMainPool.fQueue, msg); err != nil {
|
||||
return
|
||||
@ -134,7 +134,7 @@ func (p *sQBProblemProcessor) runMainPoolFiller(pCtx context.Context, pCancel fu
|
||||
|
||||
func (p *sQBProblemProcessor) EnqueueMessage(pPubKey asymmetric.IPubKey, pBytes []byte) error {
|
||||
incCount := atomic.AddInt64(&p.fMainPool.fCount, 1)
|
||||
if uint64(incCount) > uint64(cap(p.fMainPool.fQueue)) {
|
||||
if uint64(incCount) > uint64(cap(p.fMainPool.fQueue)) { //nolint:gosec
|
||||
atomic.AddInt64(&p.fMainPool.fCount, -1)
|
||||
return ErrQueueLimit
|
||||
}
|
||||
@ -188,7 +188,7 @@ func (p *sQBProblemProcessor) DequeueMessage(pCtx context.Context) layer1.IMessa
|
||||
|
||||
func (p *sQBProblemProcessor) fillRandPool(pCtx context.Context) error {
|
||||
incCount := atomic.AddInt64(&p.fRandPool.fCount, 1)
|
||||
if uint64(incCount) > uint64(cap(p.fRandPool.fQueue)) {
|
||||
if uint64(incCount) > uint64(cap(p.fRandPool.fQueue)) { //nolint:gosec
|
||||
atomic.AddInt64(&p.fRandPool.fCount, -1)
|
||||
select {
|
||||
case <-pCtx.Done():
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package queue
|
||||
|
||||
import (
|
||||
@ -117,7 +117,7 @@ func TestRunStopQueue(t *testing.T) {
|
||||
if uint64(len(sQueue.fRandPool.fQueue)) == sett.GetQueuePoolCap()[0] {
|
||||
return nil
|
||||
}
|
||||
return errors.New("len(void queue) != max capacity")
|
||||
return errors.New("len(void queue) != max capacity") //nolint:err113
|
||||
})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
@ -218,7 +218,7 @@ func testQueue(queue IQBProblemProcessor) error {
|
||||
for i := 0; i < len(msgs)-1; i++ {
|
||||
for j := i + 1; j < len(msgs); j++ {
|
||||
if bytes.Equal(msgs[i].GetHash(), msgs[j].GetHash()) {
|
||||
return fmt.Errorf("hash of messages equals (%d and %d)", i, i)
|
||||
return fmt.Errorf("hash of messages equals (%d and %d)", i, i) //nolint:err113
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,7 +232,7 @@ func testQueue(queue IQBProblemProcessor) error {
|
||||
|
||||
cancel()
|
||||
if <-notClosed {
|
||||
return errors.New("success dequeue with close")
|
||||
return errors.New("success dequeue with close") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package client
|
||||
|
||||
import (
|
||||
@ -226,12 +226,12 @@ func (p *tsPrivKey) GetDSAPrivKey() asymmetric.IDSAPrivKey { return &tsDSAPrivKe
|
||||
|
||||
func (p *tsKEMPubKey) ToBytes() []byte { return nil }
|
||||
func (p *tsKEMPubKey) Encapsulate() ([]byte, []byte, error) {
|
||||
return nil, nil, errors.New("some error")
|
||||
return nil, nil, errors.New("some error") //nolint:err113
|
||||
}
|
||||
|
||||
func (p *tsKEMPrivKey) ToBytes() []byte { return nil }
|
||||
func (p *tsKEMPrivKey) GetPubKey() asymmetric.IKEMPubKey { return &tsKEMPubKey{} }
|
||||
func (p *tsKEMPrivKey) Decapsulate([]byte) ([]byte, error) { return nil, errors.New("some error") }
|
||||
func (p *tsKEMPrivKey) Decapsulate([]byte) ([]byte, error) { return nil, errors.New("some error") } //nolint:err113
|
||||
|
||||
func (p *tsDSAPrivKey) ToBytes() []byte { return nil }
|
||||
func (p *tsDSAPrivKey) GetPubKey() asymmetric.IDSAPubKey { return &tsDSAPubKey{} }
|
||||
|
||||
@ -12,17 +12,17 @@ import (
|
||||
func decrypt(client client.IClient, outFilename, inFilename string) error {
|
||||
mapKeys := asymmetric.NewMapPubKeys(client.GetPrivKey().GetPubKey())
|
||||
|
||||
infile, err := os.Open(inFilename)
|
||||
infile, err := os.Open(inFilename) //nolint:gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer infile.Close()
|
||||
defer func() { _ = infile.Close() }()
|
||||
|
||||
outfile, err := os.Create(outFilename)
|
||||
outfile, err := os.Create(outFilename) //nolint:gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer infile.Close()
|
||||
defer func() { _ = infile.Close() }()
|
||||
|
||||
buf := make([]byte, client.GetMessageSize())
|
||||
for i := 0; ; i++ {
|
||||
@ -33,8 +33,8 @@ func decrypt(client client.IClient, outFilename, inFilename string) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
if uint64(n) != client.GetMessageSize() {
|
||||
return errors.New("uint64(n) != msgSize")
|
||||
if uint64(n) != client.GetMessageSize() { //nolint:gosec
|
||||
return errors.New("uint64(n) != msgSize") //nolint:err113
|
||||
}
|
||||
_, chunk, err := client.DecryptMessage(mapKeys, buf[:n])
|
||||
if err != nil {
|
||||
|
||||
@ -11,17 +11,17 @@ import (
|
||||
func encrypt(client client.IClient, outFilename, inFilename string) error {
|
||||
pldLimit := client.GetPayloadLimit()
|
||||
|
||||
infile, err := os.Open(inFilename)
|
||||
infile, err := os.Open(inFilename) //nolint:gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer infile.Close()
|
||||
defer func() { _ = infile.Close() }()
|
||||
|
||||
outfile, err := os.Create(outFilename)
|
||||
outfile, err := os.Create(outFilename) //nolint:gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer infile.Close()
|
||||
defer func() { _ = infile.Close() }()
|
||||
|
||||
buf := make([]byte, pldLimit)
|
||||
for i := 0; ; i++ {
|
||||
|
||||
@ -8,15 +8,15 @@ import (
|
||||
)
|
||||
|
||||
func fileHash(filename string) []byte {
|
||||
f, err := os.Open(filename)
|
||||
f, err := os.Open(filename) //nolint:gosec
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() { _ = f.Close() }()
|
||||
|
||||
h := sha256.New()
|
||||
if _, err := io.Copy(h, f); err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatal(err) //nolint:gocritic
|
||||
}
|
||||
|
||||
return h.Sum(nil)
|
||||
|
||||
@ -26,8 +26,8 @@ func (p *sKeyBuilder) Build(pPassword string, pKeyLen uint64) []byte {
|
||||
return pbkdf2.Key(
|
||||
[]byte(pPassword),
|
||||
p.fSalt,
|
||||
int(p.fIterN),
|
||||
int(pKeyLen),
|
||||
int(p.fIterN), //nolint:gosec
|
||||
int(pKeyLen), //nolint:gosec
|
||||
sha512.New,
|
||||
)
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ func (p *sPoWPuzzle) ProofBytes(pPackHash []byte, pParallel uint64) uint64 {
|
||||
target = big.NewInt(1)
|
||||
)
|
||||
|
||||
maxParallel := uint64(runtime.GOMAXPROCS(0))
|
||||
maxParallel := uint64(runtime.GOMAXPROCS(0)) //nolint:gosec
|
||||
setParallel := pParallel
|
||||
if pParallel == 0 {
|
||||
setParallel = 1
|
||||
|
||||
@ -134,7 +134,7 @@ func BenchmarkPuzzleParallel(b *testing.B) {
|
||||
b.Run(t.name, func(b *testing.B) {
|
||||
|
||||
b.StopTimer()
|
||||
parallel := uint64(runtime.GOMAXPROCS(0))
|
||||
parallel := uint64(runtime.GOMAXPROCS(0)) //nolint:gosec
|
||||
randomBytes := make([][]byte, 0, b.N)
|
||||
for i := 0; i < b.N; i++ {
|
||||
randomBytes = append(randomBytes, testutils.PseudoRandomBytes(i))
|
||||
|
||||
@ -56,7 +56,7 @@ func TestPuzzle(t *testing.T) {
|
||||
func TestMultiPuzzle(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
parallel := uint64(runtime.GOMAXPROCS(0) + 1)
|
||||
parallel := uint64(runtime.GOMAXPROCS(0) + 1) //nolint:gosec
|
||||
puzzle := NewPoWPuzzle(4)
|
||||
for i := uint64(0); i < 1_000; i++ {
|
||||
arr := encoding.Uint64ToBytes(i)
|
||||
|
||||
@ -49,7 +49,7 @@ func (p *sRandom) GetBytes(n uint64) []byte {
|
||||
*/
|
||||
func (p *sRandom) GetString(n uint64) string {
|
||||
result := strings.Builder{}
|
||||
result.Grow(int(n))
|
||||
result.Grow(int(n)) //nolint:gosec
|
||||
|
||||
randBytes := p.GetBytes(n)
|
||||
for _, b := range randBytes {
|
||||
|
||||
@ -32,7 +32,7 @@ func NewCipher(pKey []byte) ICipher {
|
||||
|
||||
func (p *sAESCipher) EncryptBytes(pMsg []byte) []byte {
|
||||
blockSize := p.fBlock.BlockSize()
|
||||
iv := random.NewRandom().GetBytes(uint64(blockSize))
|
||||
iv := random.NewRandom().GetBytes(uint64(blockSize)) //nolint:gosec
|
||||
|
||||
stream := cipher.NewCFBEncrypter(p.fBlock, iv)
|
||||
result := make([]byte, len(pMsg)+len(iv))
|
||||
|
||||
@ -61,24 +61,24 @@ func TestLogger(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
defer func() {
|
||||
os.Remove(tcPathInfo)
|
||||
os.Remove(tcPathWarning)
|
||||
os.Remove(tcPathError)
|
||||
_ = os.Remove(tcPathInfo)
|
||||
_ = os.Remove(tcPathWarning)
|
||||
_ = os.Remove(tcPathError)
|
||||
}()
|
||||
|
||||
fileInfo, err := os.OpenFile(tcPathInfo, os.O_CREATE|os.O_WRONLY, 0644)
|
||||
fileInfo, err := os.OpenFile(tcPathInfo, os.O_CREATE|os.O_WRONLY, 0600)
|
||||
if err != nil {
|
||||
t.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
fileWarn, err := os.OpenFile(tcPathWarning, os.O_CREATE|os.O_WRONLY, 0644)
|
||||
fileWarn, err := os.OpenFile(tcPathWarning, os.O_CREATE|os.O_WRONLY, 0600)
|
||||
if err != nil {
|
||||
t.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
fileErro, err := os.OpenFile(tcPathError, os.O_CREATE|os.O_WRONLY, 0644)
|
||||
fileErro, err := os.OpenFile(tcPathError, os.O_CREATE|os.O_WRONLY, 0600)
|
||||
if err != nil {
|
||||
t.Error(err.Error())
|
||||
return
|
||||
|
||||
@ -155,7 +155,7 @@ PASS
|
||||
|
||||
// go test -bench=BenchmarkMessageParallel -benchtime=100x -timeout 99999s
|
||||
func BenchmarkMessageParallel(b *testing.B) {
|
||||
gomaxprocs := uint64(runtime.GOMAXPROCS(0))
|
||||
gomaxprocs := uint64(runtime.GOMAXPROCS(0)) //nolint:gosec
|
||||
|
||||
benchTable := []struct {
|
||||
name string
|
||||
|
||||
@ -100,7 +100,7 @@ func (p *sConn) sendBytes(pCtx context.Context, pBytes []byte) error {
|
||||
return errors.Join(ErrWriteToSocket, err)
|
||||
}
|
||||
|
||||
bytesPtr -= uint64(n)
|
||||
bytesPtr -= uint64(n) //nolint:gosec
|
||||
pBytes = pBytes[:bytesPtr]
|
||||
}
|
||||
}
|
||||
@ -181,7 +181,7 @@ func (p *sConn) recvDataBytes(pCtx context.Context, pMustLen uint32, pInitTimeou
|
||||
[]byte{},
|
||||
)
|
||||
|
||||
mustLen -= uint32(n)
|
||||
mustLen -= uint32(n) //nolint:gosec
|
||||
|
||||
if err := p.fSocket.SetReadDeadline(time.Now().Add(p.fSettings.GetReadTimeout())); err != nil {
|
||||
return nil, errors.Join(ErrSetReadDeadline, err)
|
||||
|
||||
@ -41,14 +41,14 @@ func (p *tsConn) Read(b []byte) (n int, err error) {
|
||||
return n, nil
|
||||
}
|
||||
if p.cancelBody {
|
||||
return 0, errors.New("some error1") // nolint: goerr113
|
||||
return 0, errors.New("some error1") //nolint:err113
|
||||
}
|
||||
bodyBytes := random.NewRandom().GetBytes(p.bodySize)
|
||||
n = copy(b, bodyBytes)
|
||||
return n, nil
|
||||
}
|
||||
func (p *tsConn) Write(_ []byte) (n int, err error) {
|
||||
return 0, errors.New("some error2") // nolint: goerr113
|
||||
return 0, errors.New("some error2") //nolint:err113
|
||||
}
|
||||
func (p *tsConn) Close() error { return nil }
|
||||
func (p *tsConn) LocalAddr() net.Addr { return &net.TCPAddr{} }
|
||||
@ -56,7 +56,7 @@ func (p *tsConn) RemoteAddr() net.Addr { return &net.TCPAddr{} }
|
||||
func (p *tsConn) SetDeadline(_ time.Time) error { return nil }
|
||||
func (p *tsConn) SetReadDeadline(_ time.Time) error {
|
||||
if p.bodyPart && p.readDlError {
|
||||
return errors.New("some error3") // nolint: goerr113
|
||||
return errors.New("some error3") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -502,7 +502,7 @@ func testNewService(t *testing.T, pAddr, pNetworkKey string) net.Listener {
|
||||
}
|
||||
|
||||
ok := func() bool {
|
||||
defer conn.Close()
|
||||
defer func() { _ = conn.Close() }()
|
||||
return conn.WriteMessage(ctx, msg) == nil
|
||||
}()
|
||||
|
||||
@ -519,5 +519,5 @@ func testFreeService(listener net.Listener) {
|
||||
if listener == nil {
|
||||
return
|
||||
}
|
||||
listener.Close()
|
||||
_ = listener.Close()
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package connkeeper
|
||||
|
||||
import (
|
||||
@ -98,7 +98,7 @@ func TestConnKeeper(t *testing.T) {
|
||||
go func() {
|
||||
err1 := testutils.TryN(50, 20*time.Millisecond, func() error {
|
||||
if err := connKeeper.Run(ctx2); err == nil {
|
||||
return errors.New("error is nil with already running connKeeper")
|
||||
return errors.New("error is nil with already running connKeeper") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@ -110,7 +110,7 @@ func TestConnKeeper(t *testing.T) {
|
||||
|
||||
err1 := testutils.TryN(50, 20*time.Millisecond, func() error {
|
||||
if len(connKeeper.GetNetworkNode().GetConnections()) != 1 {
|
||||
return errors.New("length of connections != 1")
|
||||
return errors.New("length of connections != 1") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@ -170,5 +170,5 @@ func testFreeService(listener net.Listener) {
|
||||
if listener == nil {
|
||||
return
|
||||
}
|
||||
listener.Close()
|
||||
_ = listener.Close()
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ const (
|
||||
|
||||
var handler = func(serviceName string) network.IHandlerF {
|
||||
return func(ctx context.Context, node network.INode, _ conn.IConn, msg layer1.IMessage) error {
|
||||
defer node.BroadcastMessage(ctx, msg) // send this message to other connections
|
||||
defer func() { _ = node.BroadcastMessage(ctx, msg) }() // send this message to other connections
|
||||
fmt.Printf("'%s' got '%s'\n", serviceName, string(msg.GetPayload().GetBody()))
|
||||
return nil
|
||||
}
|
||||
@ -38,7 +38,7 @@ func main() {
|
||||
node4 = runClientNode("node4")
|
||||
)
|
||||
|
||||
node4.BroadcastMessage(
|
||||
_ = node4.BroadcastMessage(
|
||||
context.Background(),
|
||||
layer1.NewMessage(
|
||||
layer1.NewConstructSettings(&layer1.SConstructSettings{
|
||||
@ -58,7 +58,7 @@ func runClientNode(id string) network.INode {
|
||||
ctx := context.Background()
|
||||
node := newNode("").HandleFunc(serviceHeader, handler(id))
|
||||
|
||||
node.AddConnection(ctx, serviceAddress)
|
||||
_ = node.AddConnection(ctx, serviceAddress)
|
||||
return node
|
||||
}
|
||||
|
||||
|
||||
@ -32,13 +32,13 @@ var handler = func(id string) network.IHandlerF {
|
||||
}
|
||||
|
||||
fmt.Printf("'%s' got '%s#%d'\n", id, val, num)
|
||||
n.BroadcastMessage(
|
||||
_ = n.BroadcastMessage(
|
||||
ctx,
|
||||
layer1.NewMessage(
|
||||
layer1.NewConstructSettings(&layer1.SConstructSettings{
|
||||
FSettings: n.GetSettings().GetConnSettings().GetMessageSettings(),
|
||||
}),
|
||||
payload.NewPayload32(serviceHeader, []byte(fmt.Sprintf("%d", num+1))),
|
||||
payload.NewPayload32(serviceHeader, []byte(strconv.Itoa(num+1))),
|
||||
),
|
||||
)
|
||||
|
||||
@ -61,7 +61,7 @@ func main() {
|
||||
}),
|
||||
payload.NewPayload32(serviceHeader, []byte("0")),
|
||||
)
|
||||
node1.BroadcastMessage(ctx, msg)
|
||||
_ = node1.BroadcastMessage(ctx, msg)
|
||||
|
||||
select {}
|
||||
}
|
||||
@ -70,7 +70,7 @@ func runClientNode(id string) network.INode {
|
||||
ctx := context.Background()
|
||||
node := newNode("").HandleFunc(serviceHeader, handler(id))
|
||||
|
||||
node.AddConnection(ctx, serviceAddress)
|
||||
_ = node.AddConnection(ctx, serviceAddress)
|
||||
return node
|
||||
}
|
||||
|
||||
|
||||
@ -117,11 +117,11 @@ func (p *sNode) Run(pCtx context.Context) error {
|
||||
if err != nil {
|
||||
return errors.Join(ErrCreateListener, err)
|
||||
}
|
||||
defer listener.Close()
|
||||
defer func() { _ = listener.Close() }()
|
||||
|
||||
go func() {
|
||||
<-pCtx.Done()
|
||||
listener.Close()
|
||||
_ = listener.Close()
|
||||
}()
|
||||
|
||||
p.setListener(listener)
|
||||
@ -136,7 +136,7 @@ func (p *sNode) Run(pCtx context.Context) error {
|
||||
}
|
||||
|
||||
if p.hasMaxConnSize() {
|
||||
tconn.Close()
|
||||
_ = tconn.Close()
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package network
|
||||
|
||||
import (
|
||||
@ -132,13 +132,13 @@ func TestBroadcast(t *testing.T) {
|
||||
val := string(pMsg.GetPayload().GetBody())
|
||||
flag, ok := mapp[node][val]
|
||||
if !ok {
|
||||
err := fmt.Errorf("incoming value '%s' undefined", val)
|
||||
err := fmt.Errorf("incoming value '%s' undefined", val) //nolint:err113
|
||||
t.Error(err)
|
||||
return err
|
||||
}
|
||||
|
||||
if flag {
|
||||
err := fmt.Errorf("incoming value '%s' already exists", val)
|
||||
err := fmt.Errorf("incoming value '%s' already exists", val) //nolint:err113
|
||||
t.Error(err)
|
||||
return err
|
||||
}
|
||||
@ -234,7 +234,7 @@ func TestNodeConnection(t *testing.T) {
|
||||
|
||||
err1 := testutils.TryN(50, 10*time.Millisecond, func() error {
|
||||
if err := node1.AddConnection(ctx, "unknown_connection_address"); err == nil {
|
||||
return errors.New("success add incorrect connection address")
|
||||
return errors.New("success add incorrect connection address") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@ -270,7 +270,7 @@ func TestNodeConnection(t *testing.T) {
|
||||
|
||||
err2 := testutils.TryN(50, 10*time.Millisecond, func() error {
|
||||
if len(node3.GetConnections()) != 1 {
|
||||
return errors.New("has more than 1 connections (node2 should be auto disconnects by max conns param)")
|
||||
return errors.New("has more than 1 connections (node2 should be auto disconnects by max conns param)") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@ -298,7 +298,7 @@ func TestHandleMessage(t *testing.T) {
|
||||
}
|
||||
|
||||
node.HandleFunc(1, func(_ context.Context, _ INode, _ conn.IConn, _ layer1.IMessage) error {
|
||||
return errors.New("some error")
|
||||
return errors.New("some error") //nolint:err113
|
||||
})
|
||||
msg2 := layer1.NewMessage(sett, payload.NewPayload32(1, []byte{2}))
|
||||
if ok := node.handleMessage(ctx, nil, msg2); ok {
|
||||
|
||||
@ -14,7 +14,7 @@ func NewBytesJoiner32(pBytesSlice [][]byte) []byte {
|
||||
p = append(
|
||||
p,
|
||||
payload.NewPayload32(
|
||||
uint32(len(b)),
|
||||
uint32(len(b)), //nolint:gosec
|
||||
b,
|
||||
).ToBytes()...,
|
||||
)
|
||||
@ -34,7 +34,7 @@ func LoadBytesJoiner32(pJoinerBytes []byte) ([][]byte, error) {
|
||||
pLen := pld.GetHead()
|
||||
pBytes := pld.GetBody()
|
||||
|
||||
if pLen > uint32(len(pBytes)) {
|
||||
if pLen > uint32(len(pBytes)) { //nolint:gosec
|
||||
return nil, ErrInvalidLength
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package state
|
||||
|
||||
import (
|
||||
@ -73,7 +73,7 @@ func Test_sState_Enable(t *testing.T) {
|
||||
fields: fields{
|
||||
fEnabled: true,
|
||||
},
|
||||
args: args{f: func() error { return errors.New("some error") }},
|
||||
args: args{f: func() error { return errors.New("some error") }}, //nolint:err113
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
@ -97,7 +97,7 @@ func Test_sState_Enable(t *testing.T) {
|
||||
fields: fields{
|
||||
fEnabled: false,
|
||||
},
|
||||
args: args{f: func() error { return errors.New("some error") }},
|
||||
args: args{f: func() error { return errors.New("some error") }}, //nolint:err113
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
@ -149,7 +149,7 @@ func Test_sState_Disable(t *testing.T) {
|
||||
fields: fields{
|
||||
fEnabled: true,
|
||||
},
|
||||
args: args{f: func() error { return errors.New("some error") }},
|
||||
args: args{f: func() error { return errors.New("some error") }}, //nolint:err113
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
@ -173,7 +173,7 @@ func Test_sState_Disable(t *testing.T) {
|
||||
fields: fields{
|
||||
fEnabled: false,
|
||||
},
|
||||
args: args{f: func() error { return errors.New("some error") }},
|
||||
args: args{f: func() error { return errors.New("some error") }}, //nolint:err113
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
|
||||
6
pkg/storage/cache/cache_test.go
vendored
6
pkg/storage/cache/cache_test.go
vendored
@ -19,19 +19,19 @@ func TestLRUCache(t *testing.T) {
|
||||
}
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
key := encoding.Uint64ToBytes(uint64(i))
|
||||
key := encoding.Uint64ToBytes(uint64(i)) //nolint:gosec
|
||||
if ok := lruCache.Set(key[:], []byte(fmt.Sprintf("_%d_", i))); !ok {
|
||||
t.Errorf("failed push %d", i)
|
||||
return
|
||||
}
|
||||
if lruCache.GetIndex() != uint64((i+1)%3) {
|
||||
if lruCache.GetIndex() != uint64((i+1)%3) { //nolint:gosec
|
||||
t.Error("got invalid index")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
key := encoding.Uint64ToBytes(uint64(i))
|
||||
key := encoding.Uint64ToBytes(uint64(i)) //nolint:gosec
|
||||
val, ok := lruCache.Get(
|
||||
key[:],
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ func TestInvalidCreateDB(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
path := "./not_exist/path/to/database/57199u140291724y121291d1/database.db"
|
||||
defer os.RemoveAll(path)
|
||||
defer func() { _ = os.RemoveAll(path) }()
|
||||
|
||||
_, err := NewKVDatabase(path)
|
||||
if err == nil {
|
||||
@ -39,14 +39,14 @@ func TestClosedDB(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := fmt.Sprintf(tcPathDBTemplate, 2)
|
||||
defer os.RemoveAll(dbPath)
|
||||
defer func() { _ = os.RemoveAll(dbPath) }()
|
||||
|
||||
db, err := NewKVDatabase(dbPath)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
defer db.Close()
|
||||
defer func() { _ = db.Close() }()
|
||||
|
||||
if err := db.Close(); err != nil {
|
||||
t.Error(err)
|
||||
@ -68,14 +68,14 @@ func TestCreateDB(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := fmt.Sprintf(tcPathDBTemplate, 3)
|
||||
defer os.RemoveAll(dbPath)
|
||||
defer func() { _ = os.RemoveAll(dbPath) }()
|
||||
|
||||
store, err := NewKVDatabase(dbPath)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
defer store.Close()
|
||||
defer func() { _ = store.Close() }()
|
||||
|
||||
if err := store.Set([]byte("KEY"), []byte("VALUE")); err != nil {
|
||||
t.Error(err)
|
||||
@ -97,14 +97,14 @@ func TestBasicDB(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := fmt.Sprintf(tcPathDBTemplate, 1)
|
||||
defer os.RemoveAll(dbPath)
|
||||
defer func() { _ = os.RemoveAll(dbPath) }()
|
||||
|
||||
store, err := NewKVDatabase(dbPath)
|
||||
if err != nil {
|
||||
t.Error("[testBasic]", err)
|
||||
return
|
||||
}
|
||||
defer store.Close()
|
||||
defer func() { _ = store.Close() }()
|
||||
|
||||
if _, err := store.Get([]byte("KEY")); err == nil {
|
||||
t.Error("[testBasic] success get with bucket=nil")
|
||||
|
||||
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 12558"><title>code lines: 12558</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">12558</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">12558</text></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 12322"><title>code lines: 12322</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">12322</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">12322</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="28.000000" y="41.600000" width="960.824561" height="570.400000" style="fill: rgb(4, 115, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="28.000000" y="41.600000" width="960.834356" height="570.400000" style="fill: rgb(4, 115, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -33,13 +33,13 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="996.824561" y="41.600000" width="3.175439" height="570.400000" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="996.834356" y="41.600000" width="3.165644" height="570.400000" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="36.000000" y="63.200000" width="503.498544" height="284.995702" style="fill: rgb(4, 114, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="36.000000" y="63.200000" width="503.895053" height="284.512211" style="fill: rgb(4, 114, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -52,12 +52,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="739.126947" y="292.392337" width="133.495315" height="159.236568" style="fill: rgb(8, 122, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="739.355540" y="292.392337" width="133.371329" height="159.236568" style="fill: rgb(8, 122, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(747.126947,307.992337) scale(1.000000)"
|
||||
transform="translate(747.355540,307.992337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">client</text>
|
||||
|
||||
@ -65,12 +65,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="547.498544" y="63.200000" width="433.326017" height="221.192337" style="fill: rgb(2, 110, 58);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="547.895053" y="63.200000" width="432.939303" height="221.192337" style="fill: rgb(2, 110, 58);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(555.498544,78.800000) scale(1.000000)"
|
||||
transform="translate(555.895053,78.800000) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">crypto</text>
|
||||
|
||||
@ -78,12 +78,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="842.660104" y="459.628905" width="138.164457" height="80.883139" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="842.797976" y="459.628905" width="138.036380" height="80.883139" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(850.660104,475.228905) scale(1.000000)"
|
||||
transform="translate(850.797976,475.228905) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">encoding</text>
|
||||
|
||||
@ -91,12 +91,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="739.126947" y="459.628905" width="95.533157" height="144.371095" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="739.355540" y="459.628905" width="95.442436" height="144.371095" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(747.126947,475.228905) scale(1.000000)"
|
||||
transform="translate(747.355540,475.228905) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">logger</text>
|
||||
|
||||
@ -104,12 +104,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="547.498544" y="292.392337" width="183.628402" height="156.646372" style="fill: rgb(2, 111, 58);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="547.895053" y="292.392337" width="183.460487" height="156.646372" style="fill: rgb(2, 111, 58);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(555.498544,307.992337) scale(1.000000)"
|
||||
transform="translate(555.895053,307.992337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">message</text>
|
||||
|
||||
@ -117,12 +117,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="36.000000" y="356.195702" width="503.498544" height="247.804298" style="fill: rgb(9, 124, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="36.000000" y="355.712211" width="503.895053" height="248.287789" style="fill: rgb(9, 124, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(44.000000,371.795702) scale(1.000000)"
|
||||
transform="translate(44.000000,371.312211) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">network</text>
|
||||
|
||||
@ -130,12 +130,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="880.622262" y="292.392337" width="100.202300" height="159.236568" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="880.726869" y="292.392337" width="100.107487" height="159.236568" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(888.622262,307.992337) scale(1.000000)"
|
||||
transform="translate(888.726869,307.992337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">payload</text>
|
||||
|
||||
@ -143,12 +143,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="842.660104" y="548.512044" width="138.164457" height="55.487956" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="842.797976" y="548.512044" width="138.036380" height="55.487956" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(850.660104,564.112044) scale(1.000000)"
|
||||
transform="translate(850.797976,564.112044) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">state</text>
|
||||
|
||||
@ -156,12 +156,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="547.498544" y="457.038709" width="183.628402" height="146.961291" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="547.895053" y="457.038709" width="183.460487" height="146.961291" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(555.498544,472.638709) scale(1.000000)"
|
||||
transform="translate(555.895053,472.638709) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">storage</text>
|
||||
|
||||
@ -169,12 +169,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="432.364688" y="268.992799" width="53.219346" height="31.601452" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="432.675466" y="268.654693" width="53.268335" height="31.528759" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(440.364688,284.592799) scale(0.430779)"
|
||||
transform="translate(440.675466,284.254693) scale(0.431346)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">action.go</text>
|
||||
|
||||
@ -182,13 +182,13 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="493.584035" y="312.994412" width="26.435882" height="27.201290" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="493.943801" y="312.575537" width="26.463439" height="27.136675" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="44.000000" y="84.800000" width="268.129220" height="255.395702" style="fill: rgb(2, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="44.000000" y="84.800000" width="268.350184" height="254.912211" style="fill: rgb(2, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -201,18 +201,18 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="528.019917" y="312.994412" width="3.478627" height="27.201290" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="528.407240" y="312.575537" width="3.487813" height="27.136675" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="493.584035" y="268.992799" width="37.914510" height="36.001613" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="493.943801" y="268.654693" width="37.951252" height="35.920843" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(501.584035,284.592799) scale(0.326109)"
|
||||
transform="translate(501.943801,284.254693) scale(0.326656)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">head.go</text>
|
||||
|
||||
@ -220,12 +220,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="320.129220" y="268.992799" width="104.235468" height="71.202904" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="320.350184" y="268.654693" width="104.325282" height="71.057518" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(328.129220,284.592799) scale(0.437676)"
|
||||
transform="translate(328.350184,284.254693) scale(0.438121)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">logger/log_builder.go</text>
|
||||
|
||||
@ -233,12 +233,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="320.129220" y="84.800000" width="211.369325" height="176.192799" style="fill: rgb(8, 123, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="320.350184" y="84.800000" width="211.544869" height="175.854693" style="fill: rgb(8, 123, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(328.129220,100.400000) scale(1.000000)"
|
||||
transform="translate(328.350184,100.400000) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">queue</text>
|
||||
|
||||
@ -246,12 +246,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="432.364688" y="308.594251" width="53.219346" height="31.601452" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="432.675466" y="308.183452" width="53.268335" height="31.528759" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(440.364688,324.194251) scale(0.352456)"
|
||||
transform="translate(440.675466,323.783452) scale(0.352920)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">settings.go</text>
|
||||
|
||||
@ -259,12 +259,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="747.126947" y="313.992337" width="117.495315" height="126.937812" style="fill: rgb(8, 123, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="747.355540" y="313.992337" width="117.371329" height="126.937812" style="fill: rgb(8, 123, 65);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(755.126947,329.592337) scale(1.000000)"
|
||||
transform="translate(755.355540,329.592337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">client.go</text>
|
||||
|
||||
@ -272,12 +272,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="555.498544" y="84.800000" width="249.536854" height="191.592337" style="fill: rgb(2, 111, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="555.895053" y="84.800000" width="249.302697" height="191.592337" style="fill: rgb(2, 111, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(563.498544,100.400000) scale(1.000000)"
|
||||
transform="translate(563.895053,100.400000) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">asymmetric</text>
|
||||
|
||||
@ -285,12 +285,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="874.672234" y="225.697516" width="84.883286" height="50.694821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="874.778544" y="225.697516" width="84.798835" height="50.694821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(882.672234,241.297516) scale(1.000000)"
|
||||
transform="translate(882.778544,241.297516) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">hashing</text>
|
||||
|
||||
@ -298,18 +298,18 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="967.555520" y="225.697516" width="5.269041" height="50.694821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="967.577379" y="225.697516" width="5.256976" height="50.694821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="813.035399" y="84.800000" width="159.789163" height="77.871122" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="813.197750" y="84.800000" width="159.636606" height="77.871122" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(821.035399,100.400000) scale(0.936127)"
|
||||
transform="translate(821.197750,100.400000) scale(0.935134)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">puzzle/puzzle.go</text>
|
||||
|
||||
@ -317,12 +317,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="874.672234" y="170.671122" width="98.152327" height="47.026395" style="fill: rgb(16, 136, 71);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="874.778544" y="170.671122" width="98.055812" height="47.026395" style="fill: rgb(16, 136, 71);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(882.672234,186.271122) scale(0.534846)"
|
||||
transform="translate(882.778544,186.271122) scale(0.534218)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">random/random.go</text>
|
||||
|
||||
@ -330,12 +330,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="813.035399" y="170.671122" width="53.636835" height="105.721215" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="813.197750" y="170.671122" width="53.580794" height="105.721215" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(821.035399,186.271122) scale(0.178205)"
|
||||
transform="translate(821.197750,186.271122) scale(0.177939)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">symmetric/symmetric.go</text>
|
||||
|
||||
@ -343,12 +343,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="850.660104" y="481.228905" width="47.784767" height="51.283139" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="850.797976" y="481.228905" width="47.729877" height="51.283139" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(858.660104,496.828905) scale(0.413864)"
|
||||
transform="translate(858.797976,496.828905) scale(0.413149)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">bytes.go</text>
|
||||
|
||||
@ -356,30 +356,30 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="952.932178" y="530.631521" width="19.892384" height="1.880523" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="952.969417" y="530.631521" width="19.864939" height="1.880523" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="906.444871" y="481.228905" width="38.487306" height="21.641569" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="906.527853" y="481.228905" width="38.441564" height="21.641569" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="906.444871" y="510.870474" width="38.487306" height="21.641569" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="906.527853" y="510.870474" width="38.441564" height="21.641569" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="952.932178" y="481.228905" width="19.892384" height="41.402616" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="952.969417" y="481.228905" width="19.864939" height="41.402616" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(960.932178,496.828905) scale(0.023850)"
|
||||
transform="translate(960.969417,496.828905) scale(0.023682)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">serialize_yaml.go</text>
|
||||
|
||||
@ -387,12 +387,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="747.126947" y="481.228905" width="79.533157" height="96.716522" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="747.355540" y="481.228905" width="79.442436" height="96.716522" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(755.126947,496.828905) scale(0.735337)"
|
||||
transform="translate(755.355540,496.828905) scale(0.734287)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">logger.go</text>
|
||||
|
||||
@ -400,18 +400,18 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="747.126947" y="585.945427" width="79.533157" height="10.054573" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="747.355540" y="585.945427" width="79.442436" height="10.054573" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="555.498544" y="313.992337" width="118.555760" height="127.046372" style="fill: rgb(3, 113, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="555.895053" y="313.992337" width="118.434763" height="127.046372" style="fill: rgb(3, 113, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(563.498544,329.592337) scale(1.000000)"
|
||||
transform="translate(563.895053,329.592337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">layer1</text>
|
||||
|
||||
@ -419,12 +419,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="682.054305" y="313.992337" width="41.072642" height="127.046372" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="682.329815" y="313.992337" width="41.025724" height="127.046372" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(690.054305,329.592337) scale(0.435289)"
|
||||
transform="translate(690.329815,329.592337) scale(0.434474)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">layer2</text>
|
||||
|
||||
@ -432,12 +432,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="281.206750" y="377.795702" width="160.680356" height="218.204298" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="282.309990" y="377.312211" width="160.218817" height="218.687789" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(289.206750,393.395702) scale(1.000000)"
|
||||
transform="translate(290.309990,392.912211) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">conn</text>
|
||||
|
||||
@ -445,12 +445,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="449.887106" y="377.795702" width="81.611439" height="147.238243" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="450.528807" y="377.312211" width="81.366246" height="147.570051" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(457.887106,393.395702) scale(0.683452)"
|
||||
transform="translate(458.528807,392.912211) scale(0.680898)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">connkeeper</text>
|
||||
|
||||
@ -458,12 +458,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="44.000000" y="377.795702" width="229.206750" height="218.204298" style="fill: rgb(22, 147, 77);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="44.000000" y="377.312211" width="230.309990" height="218.687789" style="fill: rgb(22, 146, 77);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(52.000000,393.395702) scale(1.000000)"
|
||||
transform="translate(52.000000,392.912211) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(0, 0, 0); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">network.go</text>
|
||||
|
||||
@ -471,12 +471,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="449.887106" y="533.033946" width="76.010724" height="62.966054" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="450.528807" y="532.882262" width="75.780856" height="63.117738" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(457.887106,548.633946) scale(0.568283)"
|
||||
transform="translate(458.528807,548.482262) scale(0.566107)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">settings.go</text>
|
||||
|
||||
@ -484,12 +484,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="888.622262" y="313.992337" width="84.202300" height="59.053712" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="888.726869" y="313.992337" width="84.107487" height="59.053712" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(896.622262,329.592337) scale(1.000000)"
|
||||
transform="translate(896.726869,329.592337) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">joiner</text>
|
||||
|
||||
@ -497,12 +497,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="888.622262" y="381.046050" width="38.101150" height="62.582855" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="888.726869" y="381.046050" width="38.053743" height="62.582855" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(896.622262,396.646050) scale(0.191850)"
|
||||
transform="translate(896.726869,396.646050) scale(0.191439)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">payload32.go</text>
|
||||
|
||||
@ -510,12 +510,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="934.723412" y="381.046050" width="38.101150" height="62.582855" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="934.780612" y="381.046050" width="38.053743" height="62.582855" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(942.723412,396.646050) scale(0.191850)"
|
||||
transform="translate(942.780612,396.646050) scale(0.191439)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">payload64.go</text>
|
||||
|
||||
@ -523,18 +523,18 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="850.660104" y="570.112044" width="115.656235" height="25.887956" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="850.797976" y="570.112044" width="115.534561" height="25.887956" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="665.266296" y="478.638709" width="57.860651" height="117.361291" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="665.557857" y="478.638709" width="57.797683" height="117.361291" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(673.266296,494.238709) scale(0.363374)"
|
||||
transform="translate(673.557857,494.238709) scale(0.362827)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">cache/lru.go</text>
|
||||
|
||||
@ -542,12 +542,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="555.498544" y="478.638709" width="101.767751" height="117.361291" style="fill: rgb(11, 128, 67);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="555.895053" y="478.638709" width="101.662804" height="117.361291" style="fill: rgb(11, 128, 67);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(563.498544,494.238709) scale(1.000000)"
|
||||
transform="translate(563.895053,494.238709) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">database</text>
|
||||
|
||||
@ -555,18 +555,18 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="498.959453" y="251.330749" width="24.539092" height="1.662050" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="499.327874" y="251.013775" width="24.567179" height="1.640918" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="328.129220" y="106.400000" width="162.830233" height="146.592799" style="fill: rgb(10, 126, 67);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="328.350184" y="106.400000" width="162.977690" height="146.254693" style="fill: rgb(10, 126, 67);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(336.129220,122.000000) scale(1.000000)"
|
||||
transform="translate(336.350184,122.000000) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">queue.go</text>
|
||||
|
||||
@ -574,12 +574,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="498.959453" y="106.400000" width="24.539092" height="136.930749" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="499.327874" y="106.400000" width="24.567179" height="136.613775" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(506.959453,122.000000) scale(0.080863)"
|
||||
transform="translate(507.327874,122.000000) scale(0.081129)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">settings.go</text>
|
||||
|
||||
@ -587,12 +587,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="660.479251" y="106.400000" width="65.425345" height="127.563509" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="660.781742" y="106.400000" width="65.354163" height="127.563509" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(668.479251,122.000000) scale(0.858079)"
|
||||
transform="translate(668.781742,122.000000) scale(0.856843)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">dsa.go</text>
|
||||
|
||||
@ -600,12 +600,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="733.904596" y="106.400000" width="63.130803" height="127.563509" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="734.135905" y="106.400000" width="63.061845" height="127.563509" style="fill: rgb(6, 119, 63);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(741.904596,122.000000) scale(0.818243)"
|
||||
transform="translate(742.135905,122.000000) scale(0.817046)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">kem.go</text>
|
||||
|
||||
@ -613,12 +613,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="563.498544" y="106.400000" width="88.980707" height="161.992337" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="563.895053" y="106.400000" width="88.886689" height="161.992337" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(571.498544,122.000000) scale(1.000000)"
|
||||
transform="translate(571.895053,122.000000) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">key.go</text>
|
||||
|
||||
@ -626,36 +626,36 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="660.479251" y="241.963509" width="136.556148" height="26.428828" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="660.781742" y="241.963509" width="136.416008" height="26.428828" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="926.605541" y="247.297516" width="24.949980" height="21.094821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="926.663593" y="247.297516" width="24.913787" height="21.094821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="882.672234" y="247.297516" width="35.933307" height="21.094821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="882.778544" y="247.297516" width="35.885049" height="21.094821" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="649.235665" y="431.452675" width="16.818640" height="1.586034" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="649.538338" y="431.452675" width="16.791477" height="1.586034" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="563.498544" y="335.592337" width="77.737120" height="97.446372" style="fill: rgb(5, 116, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="563.895053" y="335.592337" width="77.643285" height="97.446372" style="fill: rgb(5, 116, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(571.498544,351.192337) scale(0.643095)"
|
||||
transform="translate(571.895053,351.192337) scale(0.642118)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">message.go</text>
|
||||
|
||||
@ -663,12 +663,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="649.235665" y="335.592337" width="16.818640" height="87.860338" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="649.538338" y="335.592337" width="16.791477" height="87.860338" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(657.235665,351.192337) scale(0.007752)"
|
||||
transform="translate(657.538338,351.192337) scale(0.007495)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">settings.go</text>
|
||||
|
||||
@ -676,12 +676,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="690.054305" y="335.592337" width="25.072642" height="91.896563" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="690.329815" y="335.592337" width="25.025724" height="91.896563" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(698.054305,351.192337) scale(0.094507)"
|
||||
transform="translate(698.329815,351.192337) scale(0.094018)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">message.go</text>
|
||||
|
||||
@ -689,12 +689,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="289.206750" y="399.395702" width="144.680356" height="145.597107" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="290.309990" y="398.912211" width="144.218817" height="145.974835" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(297.206750,414.995702) scale(1.000000)"
|
||||
transform="translate(298.309990,414.512211) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">conn.go</text>
|
||||
|
||||
@ -702,12 +702,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="289.206750" y="552.992810" width="137.409862" height="35.007190" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="290.309990" y="552.887046" width="136.970301" height="35.112954" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(297.206750,568.592810) scale(1.000000)"
|
||||
transform="translate(298.309990,568.487046) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">settings.go</text>
|
||||
|
||||
@ -715,12 +715,12 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="457.887106" y="399.395702" width="65.611439" height="85.331267" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="458.528807" y="398.912211" width="65.366246" height="85.577752" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(465.887106,414.995702) scale(0.397528)"
|
||||
transform="translate(466.528807,414.512211) scale(0.395563)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">connkeeper.go</text>
|
||||
|
||||
@ -728,30 +728,30 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="523.319496" y="492.726969" width="0.179049" height="24.306977" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="523.743248" y="492.489963" width="0.151805" height="24.392299" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="457.887106" y="492.726969" width="57.432390" height="24.306977" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="458.528807" y="492.489963" width="57.214441" height="24.392299" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="896.622262" y="335.592337" width="64.191652" height="29.453712" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="896.726869" y="335.592337" width="64.101830" height="29.453712" style="fill: rgb(0, 104, 55);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="563.498544" y="500.238709" width="85.767751" height="85.367259" style="fill: rgb(12, 128, 68);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="563.895053" y="500.238709" width="85.662804" height="85.367259" style="fill: rgb(12, 128, 68);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(571.498544,515.838709) scale(0.660679)"
|
||||
transform="translate(571.895053,515.838709) scale(0.659686)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">database.go</text>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -1,4 +1,4 @@
|
||||
// nolint: goerr113
|
||||
// nolint: err113
|
||||
package testutils
|
||||
|
||||
import (
|
||||
@ -32,7 +32,7 @@ func TestPseudoRandomBytes(t *testing.T) {
|
||||
func TestTryN(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if err := TryN(3, 10*time.Millisecond, func() error { return errors.New("some error") }); err != nil && err.Error() != "some error" {
|
||||
if err := TryN(3, 10*time.Millisecond, func() error { return errors.New("some error") }); err != nil && err.Error() != "some error" { //nolint:err113
|
||||
t.Error("success tryN with error")
|
||||
return
|
||||
}
|
||||
@ -45,7 +45,7 @@ func TestTryN(t *testing.T) {
|
||||
10*time.Millisecond,
|
||||
func() error {
|
||||
if random.NewRandom().GetBool() {
|
||||
return errors.New("some error")
|
||||
return errors.New("some error") //nolint:err113
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user