diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19ad4a1..3891b05 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.18', '1.19', '1.20' ] + go: [ '1.20', '1.21' ] steps: - uses: actions/checkout@v3 diff --git a/acl/go.mod b/acl/go.mod index 4c069a5..39c89fb 100644 --- a/acl/go.mod +++ b/acl/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/acl -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -9,8 +9,8 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 ) -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/app/go.mod b/app/go.mod index a30435d..04caca5 100644 --- a/app/go.mod +++ b/app/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/app -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/console => ../console @@ -16,15 +16,15 @@ replace ( require ( go.osspkg.com/algorithms v1.3.1 - go.osspkg.com/goppy/console v0.1.2 - go.osspkg.com/goppy/env v0.1.2 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iofile v0.1.7 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/syscall v0.1.3 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/console v0.2.0 + go.osspkg.com/goppy/env v0.2.0 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iofile v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/syscall v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 ) require ( diff --git a/auth/go.mod b/auth/go.mod index 8a03202..0487ec7 100644 --- a/auth/go.mod +++ b/auth/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/auth -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/encryption => ../encryption @@ -18,13 +18,13 @@ replace ( require ( github.com/mailru/easyjson v0.7.7 - go.osspkg.com/goppy/encryption v0.1.6 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/ioutil v0.1.3 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/random v0.1.2 - go.osspkg.com/goppy/web v0.1.11 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/encryption v0.2.0 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/ioutil v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/random v0.2.0 + go.osspkg.com/goppy/web v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 golang.org/x/oauth2 v0.16.0 ) @@ -33,11 +33,11 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/josharian/intern v1.0.0 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect - go.osspkg.com/goppy/xc v0.1.1 // indirect - go.osspkg.com/goppy/xlog v0.1.7 // indirect - go.osspkg.com/goppy/xnet v0.1.3 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect + go.osspkg.com/goppy/xc v0.2.0 // indirect + go.osspkg.com/goppy/xlog v0.2.0 // indirect + go.osspkg.com/goppy/xnet v0.2.0 // indirect go.osspkg.com/static v1.4.0 // indirect golang.org/x/net v0.20.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/console/go.mod b/console/go.mod index 5be6e7f..56fe87b 100644 --- a/console/go.mod +++ b/console/go.mod @@ -1,12 +1,12 @@ module go.osspkg.com/goppy/console -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors go.osspkg.com/goppy/syscall => ../syscall ) -require go.osspkg.com/goppy/errors v0.1.2 +require go.osspkg.com/goppy/errors v0.2.0 -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/domain/go.mod b/domain/go.mod index 89e6ded..797956e 100644 --- a/domain/go.mod +++ b/domain/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/domain -go 1.18 +go 1.20 diff --git a/encryption/go.mod b/encryption/go.mod index 66005e6..2135d4b 100644 --- a/encryption/go.mod +++ b/encryption/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/encryption -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -10,10 +10,10 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/random v0.1.2 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/random v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 golang.org/x/crypto v0.18.0 ) -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/env/go.mod b/env/go.mod index 33180fd..e6a868d 100644 --- a/env/go.mod +++ b/env/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/env -go 1.18 +go 1.20 diff --git a/epoll/go.mod b/epoll/go.mod index a655f01..39623f4 100644 --- a/epoll/go.mod +++ b/epoll/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/epoll -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -13,16 +13,16 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 golang.org/x/sys v0.16.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/errors/go.mod b/errors/go.mod index 50c2b8d..65bb81a 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -1,7 +1,7 @@ module go.osspkg.com/goppy/errors -go 1.18 +go 1.20 replace go.osspkg.com/goppy/syscall => ../syscall -require go.osspkg.com/goppy/syscall v0.1.3 +require go.osspkg.com/goppy/syscall v0.2.0 diff --git a/examples/go.mod b/examples/go.mod index 5bfa574..50bdf2d 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -1,6 +1,6 @@ module examples -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy => ../ @@ -38,7 +38,7 @@ replace ( require ( go.osspkg.com/goppy v0.0.0-00010101000000-000000000000 - go.osspkg.com/goppy/app v0.1.11 + go.osspkg.com/goppy/app v0.1.12 go.osspkg.com/goppy/auth v0.0.0-00010101000000-000000000000 go.osspkg.com/goppy/console v0.1.2 go.osspkg.com/goppy/geoip v0.0.0-00010101000000-000000000000 @@ -84,9 +84,9 @@ require ( go.osspkg.com/goppy/encryption v0.1.6 // indirect go.osspkg.com/goppy/env v0.1.2 // indirect go.osspkg.com/goppy/errors v0.1.2 // indirect - go.osspkg.com/goppy/iofile v0.1.6 // indirect + go.osspkg.com/goppy/iofile v0.1.7 // indirect go.osspkg.com/goppy/ioutil v0.1.3 // indirect - go.osspkg.com/goppy/orm v0.1.8 // indirect + go.osspkg.com/goppy/orm v0.1.9 // indirect go.osspkg.com/goppy/random v0.1.2 // indirect go.osspkg.com/goppy/sqlcommon v0.1.8 // indirect go.osspkg.com/goppy/xnet v0.1.3 // indirect diff --git a/geoip/go.mod b/geoip/go.mod index 661ae6d..7043677 100644 --- a/geoip/go.mod +++ b/geoip/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/geoip -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -17,21 +17,21 @@ replace ( require ( github.com/oschwald/geoip2-golang v1.9.0 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/web v0.1.11 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/web v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/oschwald/maxminddb-golang v1.11.0 // indirect - go.osspkg.com/goppy/errors v0.1.2 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/ioutil v0.1.3 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect - go.osspkg.com/goppy/xc v0.1.1 // indirect - go.osspkg.com/goppy/xlog v0.1.7 // indirect - go.osspkg.com/goppy/xnet v0.1.3 // indirect + go.osspkg.com/goppy/errors v0.2.0 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/ioutil v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect + go.osspkg.com/goppy/xc v0.2.0 // indirect + go.osspkg.com/goppy/xlog v0.2.0 // indirect + go.osspkg.com/goppy/xnet v0.2.0 // indirect go.osspkg.com/static v1.4.0 // indirect golang.org/x/sys v0.16.0 // indirect ) diff --git a/go.mod b/go.mod index 1ea704e..7cd9cdf 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/app => ./app @@ -17,13 +17,13 @@ replace ( ) require ( - go.osspkg.com/goppy/app v0.1.12 - go.osspkg.com/goppy/console v0.1.2 - go.osspkg.com/goppy/env v0.1.2 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iofile v0.1.7 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/app v0.2.0 + go.osspkg.com/goppy/console v0.2.0 + go.osspkg.com/goppy/env v0.2.0 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iofile v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -31,7 +31,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect go.osspkg.com/algorithms v1.3.1 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect - go.osspkg.com/goppy/xc v0.1.1 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect + go.osspkg.com/goppy/xc v0.2.0 // indirect ) diff --git a/go.work b/go.work index b77731a..c33e37d 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.18 +go 1.20 use ( . @@ -25,6 +25,7 @@ use ( ./plugins ./random ./routine + ./search ./shell ./sip ./sqlcommon diff --git a/go.work.sum b/go.work.sum index 42972bc..19bd37b 100644 --- a/go.work.sum +++ b/go.work.sum @@ -4,6 +4,18 @@ github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWr github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/blevesearch/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:kDy+zgJFJJoJYBvdfBSiZYBbdsUL0XcjHYWezpQBGPA= +github.com/blevesearch/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:9eJDeqxJ3E7WnLebQUlPD7ZjSce7AnDb9vjGmMCbD0A= +github.com/blevesearch/goleveldb v1.0.1 h1:iAtV2Cu5s0GD1lwUiekkFHe2gTMCCNVj2foPclDLIFI= +github.com/blevesearch/goleveldb v1.0.1/go.mod h1:WrU8ltZbIp0wAoig/MHbrPCXSOLpe79nz5lv5nqfYrQ= +github.com/blevesearch/snowball v0.6.1 h1:cDYjn/NCH+wwt2UdehaLpr2e4BwLIjN4V/TdLsL+B5A= +github.com/blevesearch/snowball v0.6.1/go.mod h1:ZF0IBg5vgpeoUhnMza2v0A/z8m1cWPlwhke08LpNusg= +github.com/blevesearch/stempel v0.2.0 h1:CYzVPaScODMvgE9o+kf6D4RJ/VRomyi9uHF+PtB+Afc= +github.com/blevesearch/stempel v0.2.0/go.mod h1:wjeTHqQv+nQdbPuJ/YcvOjTInA2EIc6Ks1FoSUzSLvc= +github.com/couchbase/ghistogram v0.1.0 h1:b95QcQTCzjTUocDXp/uMgSNQi8oj1tGwnJ4bODWZnps= +github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= +github.com/couchbase/moss v0.2.0 h1:VCYrMzFwEryyhRSeI+/b3tRBSeTpi/8gn5Kf6dxqn+o= +github.com/couchbase/moss v0.2.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= @@ -13,39 +25,58 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= diff --git a/graphics/go.mod b/graphics/go.mod index ac95d6d..6e5418c 100644 --- a/graphics/go.mod +++ b/graphics/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/graphics -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -8,8 +8,8 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 + go.osspkg.com/goppy/errors v0.2.0 golang.org/x/image v0.15.0 ) -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/graphics/images.go b/graphics/images.go index b57a856..598eae0 100644 --- a/graphics/images.go +++ b/graphics/images.go @@ -1,6 +1,6 @@ /* - * Copyright (c) 2023 Mikhail Knyazhev . All rights reserved. - * Use of this source code is governed by a BSD-3-Clause license that can be found in the LICENSE file. + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. */ package graphics diff --git a/iofile/go.mod b/iofile/go.mod index df866d5..716f82f 100644 --- a/iofile/go.mod +++ b/iofile/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/iofile -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -10,15 +10,15 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/kr/pretty v0.3.1 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/iosync/go.mod b/iosync/go.mod index 1fef374..d5fd2b0 100644 --- a/iosync/go.mod +++ b/iosync/go.mod @@ -1,7 +1,7 @@ module go.osspkg.com/goppy/iosync -go 1.18 +go 1.20 replace go.osspkg.com/goppy/xtest => ../xtest -require go.osspkg.com/goppy/xtest v0.1.4 +require go.osspkg.com/goppy/xtest v0.2.0 diff --git a/ioutil/go.mod b/ioutil/go.mod index 44af648..2a0c014 100644 --- a/ioutil/go.mod +++ b/ioutil/go.mod @@ -1,12 +1,12 @@ module go.osspkg.com/goppy/ioutil -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors go.osspkg.com/goppy/syscall => ../syscall ) -require go.osspkg.com/goppy/errors v0.1.2 +require go.osspkg.com/goppy/errors v0.2.0 -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/metrics/go.mod b/metrics/go.mod index a6123bb..2d62f72 100644 --- a/metrics/go.mod +++ b/metrics/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/metrics -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/env => ../env @@ -19,14 +19,14 @@ replace ( require ( github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model v0.5.0 - go.osspkg.com/goppy/env v0.1.2 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/syscall v0.1.3 - go.osspkg.com/goppy/web v0.1.11 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/env v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/syscall v0.2.0 + go.osspkg.com/goppy/web v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 google.golang.org/protobuf v1.32.0 ) @@ -38,9 +38,9 @@ require ( github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.osspkg.com/goppy/errors v0.1.2 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/ioutil v0.1.3 // indirect + go.osspkg.com/goppy/errors v0.2.0 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/ioutil v0.2.0 // indirect go.osspkg.com/static v1.4.0 // indirect golang.org/x/sys v0.16.0 // indirect ) diff --git a/orm/go.mod b/orm/go.mod index 7590c59..c52027e 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/orm -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -14,18 +14,18 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iofile v0.1.7 - go.osspkg.com/goppy/sqlcommon v0.1.8 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iofile v0.2.0 + go.osspkg.com/goppy/sqlcommon v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ormmysql/go.mod b/ormmysql/go.mod index 63ed11a..38ed867 100644 --- a/ormmysql/go.mod +++ b/ormmysql/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/ormmysql -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -18,20 +18,20 @@ replace ( require ( github.com/go-sql-driver/mysql v1.7.1 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/orm v0.1.9 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/routine v0.1.6 - go.osspkg.com/goppy/sqlcommon v0.1.8 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/orm v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/routine v0.2.0 + go.osspkg.com/goppy/sqlcommon v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/iofile v0.1.7 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/iofile v0.2.0 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ormpgsql/go.mod b/ormpgsql/go.mod index 390f285..1532307 100644 --- a/ormpgsql/go.mod +++ b/ormpgsql/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/ormpgsql -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -18,20 +18,20 @@ replace ( require ( github.com/lib/pq v1.10.9 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/orm v0.1.9 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/routine v0.1.6 - go.osspkg.com/goppy/sqlcommon v0.1.8 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/orm v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/routine v0.2.0 + go.osspkg.com/goppy/sqlcommon v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/iofile v0.1.7 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/iofile v0.2.0 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/ormsqlite/go.mod b/ormsqlite/go.mod index 6362691..72a5e13 100644 --- a/ormsqlite/go.mod +++ b/ormsqlite/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/ormsqlite -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -18,20 +18,20 @@ replace ( require ( github.com/mattn/go-sqlite3 v1.14.19 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iofile v0.1.7 - go.osspkg.com/goppy/orm v0.1.9 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/routine v0.1.6 - go.osspkg.com/goppy/sqlcommon v0.1.8 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iofile v0.2.0 + go.osspkg.com/goppy/orm v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/routine v0.2.0 + go.osspkg.com/goppy/sqlcommon v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/plugins/go.mod b/plugins/go.mod index a4b9bbe..7e1a974 100644 --- a/plugins/go.mod +++ b/plugins/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/plugins -go 1.18 +go 1.20 diff --git a/random/go.mod b/random/go.mod index cb9297a..e47782b 100644 --- a/random/go.mod +++ b/random/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/random -go 1.18 +go 1.20 diff --git a/routine/go.mod b/routine/go.mod index 4df9544..48b2670 100644 --- a/routine/go.mod +++ b/routine/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/routine -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -10,8 +10,8 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 ) -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/search/config.go b/search/config.go new file mode 100644 index 0000000..ff982b0 --- /dev/null +++ b/search/config.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. + */ + +package search + +const ( + indexFilename = "/store/root.bolt" + + customAnalyzerName = "goppy_analyzer" + customFilterName = "goppy_filter" + + structScoreField = "Score" + + FieldText = "text" + FieldDate = "date" +) + +type ( + Config struct { + Search ConfigItem `yaml:"search"` + } + ConfigItem struct { + Folder string `yaml:"folder"` + Indexes []ConfigIndex `yaml:"indexes"` + } + ConfigIndex struct { + Name string `yaml:"name"` + Fields []ConfigIndexField `yaml:"fields"` + } + ConfigIndexField struct { + Name string `yaml:"name"` + Type string `yaml:"type"` + } +) diff --git a/search/go.mod b/search/go.mod new file mode 100644 index 0000000..833f656 --- /dev/null +++ b/search/go.mod @@ -0,0 +1,55 @@ +module go.osspkg.com/goppy/search + +go 1.20 + +replace ( + go.osspkg.com/goppy/errors => ../errors + go.osspkg.com/goppy/iofile => ../iofile + go.osspkg.com/goppy/iosync => ../iosync + go.osspkg.com/goppy/syscall => ../syscall + go.osspkg.com/goppy/xtest => ../xtest +) + +require ( + github.com/blevesearch/bleve/v2 v2.3.10 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iofile v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 +) + +require ( + github.com/RoaringBitmap/roaring v1.2.3 // indirect + github.com/bits-and-blooms/bitset v1.2.0 // indirect + github.com/blevesearch/bleve_index_api v1.0.6 // indirect + github.com/blevesearch/geo v0.1.18 // indirect + github.com/blevesearch/go-porterstemmer v1.0.3 // indirect + github.com/blevesearch/gtreap v0.1.1 // indirect + github.com/blevesearch/mmap-go v1.0.4 // indirect + github.com/blevesearch/scorch_segment_api/v2 v2.1.6 // indirect + github.com/blevesearch/segment v0.9.1 // indirect + github.com/blevesearch/snowballstem v0.9.0 // indirect + github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect + github.com/blevesearch/vellum v1.0.10 // indirect + github.com/blevesearch/zapx/v11 v11.3.10 // indirect + github.com/blevesearch/zapx/v12 v12.3.10 // indirect + github.com/blevesearch/zapx/v13 v13.3.10 // indirect + github.com/blevesearch/zapx/v14 v14.3.10 // indirect + github.com/blevesearch/zapx/v15 v15.3.13 // indirect + github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.1 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mschoch/smat v0.2.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + go.etcd.io/bbolt v1.3.7 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/search/go.sum b/search/go.sum new file mode 100644 index 0000000..559b9f2 --- /dev/null +++ b/search/go.sum @@ -0,0 +1,88 @@ +github.com/RoaringBitmap/roaring v1.2.3 h1:yqreLINqIrX22ErkKI0vY47/ivtJr6n+kMhVOVmhWBY= +github.com/RoaringBitmap/roaring v1.2.3/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/blevesearch/bleve/v2 v2.3.10 h1:z8V0wwGoL4rp7nG/O3qVVLYxUqCbEwskMt4iRJsPLgg= +github.com/blevesearch/bleve/v2 v2.3.10/go.mod h1:RJzeoeHC+vNHsoLR54+crS1HmOWpnH87fL70HAUCzIA= +github.com/blevesearch/bleve_index_api v1.0.6 h1:gyUUxdsrvmW3jVhhYdCVL6h9dCjNT/geNU7PxGn37p8= +github.com/blevesearch/bleve_index_api v1.0.6/go.mod h1:YXMDwaXFFXwncRS8UobWs7nvo0DmusriM1nztTlj1ms= +github.com/blevesearch/geo v0.1.18 h1:Np8jycHTZ5scFe7VEPLrDoHnnb9C4j636ue/CGrhtDw= +github.com/blevesearch/geo v0.1.18/go.mod h1:uRMGWG0HJYfWfFJpK3zTdnnr1K+ksZTuWKhXeSokfnM= +github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= +github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= +github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y= +github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk= +github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= +github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= +github.com/blevesearch/scorch_segment_api/v2 v2.1.6 h1:CdekX/Ob6YCYmeHzD72cKpwzBjvkOGegHOqhAkXp6yA= +github.com/blevesearch/scorch_segment_api/v2 v2.1.6/go.mod h1:nQQYlp51XvoSVxcciBjtvuHPIVjlWrN1hX4qwK2cqdc= +github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU= +github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw= +github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= +github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= +github.com/blevesearch/upsidedown_store_api v1.0.2 h1:U53Q6YoWEARVLd1OYNc9kvhBMGZzVrdmaozG2MfoB+A= +github.com/blevesearch/upsidedown_store_api v1.0.2/go.mod h1:M01mh3Gpfy56Ps/UXHjEO/knbqyQ1Oamg8If49gRwrQ= +github.com/blevesearch/vellum v1.0.10 h1:HGPJDT2bTva12hrHepVT3rOyIKFFF4t7Gf6yMxyMIPI= +github.com/blevesearch/vellum v1.0.10/go.mod h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k= +github.com/blevesearch/zapx/v11 v11.3.10 h1:hvjgj9tZ9DeIqBCxKhi70TtSZYMdcFn7gDb71Xo/fvk= +github.com/blevesearch/zapx/v11 v11.3.10/go.mod h1:0+gW+FaE48fNxoVtMY5ugtNHHof/PxCqh7CnhYdnMzQ= +github.com/blevesearch/zapx/v12 v12.3.10 h1:yHfj3vXLSYmmsBleJFROXuO08mS3L1qDCdDK81jDl8s= +github.com/blevesearch/zapx/v12 v12.3.10/go.mod h1:0yeZg6JhaGxITlsS5co73aqPtM04+ycnI6D1v0mhbCs= +github.com/blevesearch/zapx/v13 v13.3.10 h1:0KY9tuxg06rXxOZHg3DwPJBjniSlqEgVpxIqMGahDE8= +github.com/blevesearch/zapx/v13 v13.3.10/go.mod h1:w2wjSDQ/WBVeEIvP0fvMJZAzDwqwIEzVPnCPrz93yAk= +github.com/blevesearch/zapx/v14 v14.3.10 h1:SG6xlsL+W6YjhX5N3aEiL/2tcWh3DO75Bnz77pSwwKU= +github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQEOehF78m6oTgns= +github.com/blevesearch/zapx/v15 v15.3.13 h1:6EkfaZiPlAxqXz0neniq35my6S48QI94W/wyhnpDHHQ= +github.com/blevesearch/zapx/v15 v15.3.13/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFiguSNcXmS6rkKT+X7FdIrTtfo= +github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/search/search.go b/search/search.go new file mode 100644 index 0000000..47a45dd --- /dev/null +++ b/search/search.go @@ -0,0 +1,265 @@ +/* + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. + */ + +package search + +import ( + "context" + "fmt" + "os" + "reflect" + "strings" + "time" + + bleve "github.com/blevesearch/bleve/v2" + customAnalyzer "github.com/blevesearch/bleve/v2/analysis/analyzer/custom" + "github.com/blevesearch/bleve/v2/analysis/token/camelcase" + "github.com/blevesearch/bleve/v2/analysis/token/lowercase" + "github.com/blevesearch/bleve/v2/analysis/token/unicodenorm" + "github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode" + "github.com/blevesearch/bleve/v2/mapping" + "go.osspkg.com/goppy/errors" + "go.osspkg.com/goppy/iofile" +) + +type ( + Searcher interface { + Generate() error + Open() error + Close() error + Add(name, id string, data interface{}) error + Delete(name, id string) error + Search(ctx context.Context, name, query string, highlight bool, result interface{}) error + } + + serviceSearch struct { + conf ConfigItem + indexes map[string]*indexItem + } + + indexItem struct { + Index bleve.Index + Fields []string + FieldsType map[string]string + } +) + +func NewSearch(c ConfigItem) Searcher { + return &serviceSearch{ + conf: c, + indexes: make(map[string]*indexItem, len(c.Indexes)), + } +} + +func (v *serviceSearch) validate() error { + for _, index := range v.conf.Indexes { + if !isValidIndexName(index.Name) { + return fmt.Errorf("invalid index name `%s`, use chars: 0-9 a-z _", index.Name) + } + if len(index.Fields) == 0 { + return fmt.Errorf("index field is empty for `%s`", index.Name) + } + for _, field := range index.Fields { + if !isUpperCamelCase(field.Name) { + return fmt.Errorf("invalid index field name `%s`, use UpperCamelCase with char: A-Z a-z", field.Name) + } + switch field.Type { + case FieldText, FieldDate: + continue + default: + return fmt.Errorf("invalid index field type `%s`, use text or date", field.Name) + } + } + } + return nil +} + +func (v *serviceSearch) Generate() error { + if err := v.validate(); err != nil { + return err + } + + for _, conf := range v.conf.Indexes { + folderPath := v.conf.Folder + "/" + conf.Name + if iofile.Exist(folderPath + indexFilename) { + continue + } + docMapping := bleve.NewDocumentMapping() + for _, field := range conf.Fields { + var fieldMapping *mapping.FieldMapping + switch field.Type { + case FieldText: + fieldMapping = bleve.NewTextFieldMapping() + case FieldDate: + fieldMapping = bleve.NewDateTimeFieldMapping() + fieldMapping.Index = false + fieldMapping.IncludeTermVectors = false + default: + return fmt.Errorf("invalid field type `%s`", field.Name) + } + fieldMapping.IncludeInAll = false + docMapping.AddFieldMappingsAt(field.Name, fieldMapping) + } + indexMapping := bleve.NewIndexMapping() + if err := indexMapping.AddCustomTokenFilter(customFilterName, map[string]any{ + "type": unicodenorm.Name, + "form": unicodenorm.NFC, + }); err != nil { + return err + } + if err := indexMapping.AddCustomAnalyzer(customAnalyzerName, map[string]any{ + "type": customAnalyzer.Name, + "char_filters": []string{}, + "tokenizer": unicode.Name, + "token_filters": []string{customFilterName, camelcase.Name, lowercase.Name}, + }); err != nil { + return err + } + indexMapping.AddDocumentMapping(customAnalyzerName, docMapping) + indexMapping.AddDocumentMapping("_all", bleve.NewDocumentDisabledMapping()) + + if err := os.MkdirAll(folderPath, 0777); err != nil { + return err + } + bleveindex, err := bleve.New(folderPath, indexMapping) + if err != nil { + return err + } + if err = bleveindex.Close(); err != nil { + return err + } + } + + return nil +} + +func (v *serviceSearch) Open() error { + if err := v.validate(); err != nil { + return err + } + + for _, conf := range v.conf.Indexes { + folderPath := v.conf.Folder + "/" + conf.Name + if !iofile.Exist(folderPath + indexFilename) { + return errors.Wrap( + fmt.Errorf("index not found `%s`", conf.Name), + v.Close(), + ) + } + index, err := bleve.Open(folderPath) + if err != nil { + return errors.Wrap( + fmt.Errorf("index open `%s`: %w", conf.Name, err), + v.Close(), + ) + } + fields := make([]string, 0, len(conf.Fields)) + fieldsType := make(map[string]string, len(conf.Fields)) + for _, field := range conf.Fields { + fields = append(fields, field.Name) + fieldsType[field.Name] = field.Type + } + v.indexes[conf.Name] = &indexItem{ + Index: index, + Fields: fields, + FieldsType: fieldsType, + } + } + + return nil +} + +func (v *serviceSearch) Close() error { + var err error + for _, conf := range v.conf.Indexes { + indx, ok := v.indexes[conf.Name] + if !ok { + continue + } + delete(v.indexes, conf.Name) + err = errors.Wrap(indx.Index.Close()) + } + if err != nil { + return err + } + return nil +} + +func (v *serviceSearch) Add(name, id string, data interface{}) error { + indx, ok := v.indexes[name] + if !ok { + return fmt.Errorf("index not found: %s", name) + } + return indx.Index.Index(id, data) +} + +func (v *serviceSearch) Delete(name, id string) error { + indx, ok := v.indexes[name] + if !ok { + return fmt.Errorf("index not found: %s", name) + } + return indx.Index.Delete(id) +} + +// nolint: gocyclo +func (v *serviceSearch) Search(ctx context.Context, name, query string, highlight bool, result interface{}) error { + indx, ok := v.indexes[name] + if !ok { + return fmt.Errorf("index not found: %s", name) + } + rv := reflect.ValueOf(result) + if rv.Kind() != reflect.Pointer || rv.IsNil() { + return fmt.Errorf("result parameter is non-pointer %T", result) + } + if rv.Elem().Kind() != reflect.Slice { + return fmt.Errorf("result parameter is not pointer of slice") + } + re := rv.Elem().Type().Elem() + if re.Kind() != reflect.Struct { + return fmt.Errorf("result parameter must have struct of slice") + } + request := bleve.NewSearchRequestOptions(bleve.NewQueryStringQuery(query), rv.Elem().Cap(), 0, false) + request.Fields = append(request.Fields, indx.Fields...) + request.IncludeLocations = true + if highlight { + request.Highlight = bleve.NewHighlight() + } + searchResult, err := indx.Index.SearchInContext(ctx, request) + if err != nil { + return err + } + if searchResult.Total == 0 { + return nil + } + for _, hit := range searchResult.Hits { + obj := reflect.New(re) + obj.Elem().FieldByName(structScoreField).Set(reflect.ValueOf(hit.Score)) + for key, value := range hit.Fields { + t, ok := indx.FieldsType[key] + if !ok { + continue + } + switch t { + case FieldText: + if highlight { + if vv, ok := hit.Fragments[key]; ok { + value = strings.Join(vv, "") + } + } + obj.Elem().FieldByName(key).Set(reflect.ValueOf(value)) + case FieldDate: + tv, err := time.Parse(time.RFC3339, value.(string)) + if err != nil { + return err + } + obj.Elem().FieldByName(key).Set(reflect.ValueOf(tv)) + default: + } + + } + rv.Elem().Set(reflect.Append(rv.Elem(), obj.Elem())) + } + return nil +} diff --git a/search/search_test.go b/search/search_test.go new file mode 100644 index 0000000..cf7a45c --- /dev/null +++ b/search/search_test.go @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. + */ + +package search_test + +import ( + "context" + "fmt" + "os" + "testing" + "time" + + "go.osspkg.com/goppy/search" + "go.osspkg.com/goppy/xtest" +) + +type TestData struct { + Line string + Data string + CreatedAt time.Time +} + +type TestDataSearch struct { + Score float64 + Line string + Data string + CreatedAt time.Time +} + +func TestUnit_NewSearch(t *testing.T) { + conf := search.ConfigItem{ + Folder: "/tmp/TestUnit_NewSearch", + Indexes: []search.ConfigIndex{ + {Name: "demo", Fields: []search.ConfigIndexField{ + {Name: "Line", Type: "text"}, + {Name: "Data", Type: "text"}, + {Name: "CreatedAt", Type: "date"}, + }}, + }, + } + + srv := search.NewSearch(conf) + + xtest.NoError(t, srv.Generate()) + xtest.NoError(t, srv.Open()) + defer func() { + xtest.NoError(t, os.RemoveAll(conf.Folder)) + }() + xtest.NoError(t, srv.Add("demo", "001", TestData{ + Line: "1", + Data: "Hello world", + CreatedAt: time.Now(), + })) + xtest.NoError(t, srv.Add("demo", "002", TestData{ + Line: "2", + Data: "Happy world", + CreatedAt: time.Now(), + })) + result := make([]TestDataSearch, 0, 10) + //xtest.NoError(t, srv.Search("demo", "h* worl*", &result)) + xtest.NoError(t, srv.Search(context.TODO(), "demo", "Hello world", true, &result)) + fmt.Println(result) + xtest.True(t, len(result) == 2) + xtest.NoError(t, srv.Delete("demo", "002")) + result = make([]TestDataSearch, 0, 10) + xtest.NoError(t, srv.Search(context.TODO(), "demo", "h* worl*", true, &result)) + xtest.True(t, len(result) == 1) + xtest.NoError(t, srv.Close()) +} diff --git a/search/utils.go b/search/utils.go new file mode 100644 index 0000000..2ff9c8f --- /dev/null +++ b/search/utils.go @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. + */ + +package search + +import "regexp" + +var ( + rexIndexName = regexp.MustCompile(`^[a-z0-9\_]+$`) + rexUpperCamelCase = regexp.MustCompile(`^[A-Z][A-Za-z0-9]+$`) +) + +func isValidIndexName(v string) bool { + return rexIndexName.MatchString(v) +} + +func isUpperCamelCase(v string) bool { + return rexUpperCamelCase.MatchString(v) +} diff --git a/search/utils_test.go b/search/utils_test.go new file mode 100644 index 0000000..43d609b --- /dev/null +++ b/search/utils_test.go @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-2024 Mikhail Knyazhev . All rights reserved. + * Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file. + */ + +package search + +import "testing" + +func TestUnit_isValidIndexName(t *testing.T) { + tests := []struct { + name string + arg string + want bool + }{ + {name: "Case1", arg: "Aaaa", want: false}, + {name: "Case2", arg: "0-aaa", want: false}, + {name: "Case3", arg: "123_aaa", want: true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := isValidIndexName(tt.arg); got != tt.want { + t.Errorf("isValidIndexName() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/shell/go.mod b/shell/go.mod index 8201211..41b60d2 100644 --- a/shell/go.mod +++ b/shell/go.mod @@ -1,12 +1,12 @@ module go.osspkg.com/goppy/shell -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors go.osspkg.com/goppy/syscall => ../syscall ) -require go.osspkg.com/goppy/errors v0.1.2 +require go.osspkg.com/goppy/errors v0.2.0 -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/sip/go.mod b/sip/go.mod index 2ab2804..f3b3623 100644 --- a/sip/go.mod +++ b/sip/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/sip -go 1.18 +go 1.20 diff --git a/sqlcommon/go.mod b/sqlcommon/go.mod index 1091d8d..676efd0 100644 --- a/sqlcommon/go.mod +++ b/sqlcommon/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/sqlcommon -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -11,14 +11,14 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/iosync v0.1.5 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/iosync v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/syscall/go.mod b/syscall/go.mod index 4d76262..d3eb178 100644 --- a/syscall/go.mod +++ b/syscall/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/syscall -go 1.18 +go 1.20 diff --git a/tcp/go.mod b/tcp/go.mod index b4492e4..6f89e86 100644 --- a/tcp/go.mod +++ b/tcp/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/tcp -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -15,18 +15,18 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/ioutil v0.1.3 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/random v0.1.2 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/ioutil v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/random v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/udp/go.mod b/udp/go.mod index c701edc..326057b 100644 --- a/udp/go.mod +++ b/udp/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/udp -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -13,15 +13,15 @@ replace ( ) require ( - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/errors v0.1.2 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/errors v0.2.0 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/unixsocket/go.mod b/unixsocket/go.mod index 6e2a488..f949cbc 100644 --- a/unixsocket/go.mod +++ b/unixsocket/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/unixsocket -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -14,16 +14,16 @@ replace ( ) require ( - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/ioutil v0.1.3 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/ioutil v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/version/go.mod b/version/go.mod index 09155d7..7b36831 100644 --- a/version/go.mod +++ b/version/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/version -go 1.18 +go 1.20 diff --git a/web/go.mod b/web/go.mod index 3807db2..15ace5a 100644 --- a/web/go.mod +++ b/web/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/web -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -16,18 +16,18 @@ replace ( require ( github.com/mailru/easyjson v0.7.7 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/ioutil v0.1.3 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/ioutil v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 go.osspkg.com/static v1.4.0 ) require ( github.com/josharian/intern v1.0.0 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect ) diff --git a/ws/go.mod b/ws/go.mod index 6a96d9b..15e6b36 100644 --- a/ws/go.mod +++ b/ws/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/ws -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -15,16 +15,16 @@ replace ( require ( github.com/gorilla/websocket v1.5.1 github.com/mailru/easyjson v0.7.7 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect golang.org/x/net v0.20.0 // indirect ) diff --git a/xc/go.mod b/xc/go.mod index 37ab6c2..83cd45c 100644 --- a/xc/go.mod +++ b/xc/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/xc -go 1.18 +go 1.20 diff --git a/xdns/go.mod b/xdns/go.mod index d94eac9..c50ea43 100644 --- a/xdns/go.mod +++ b/xdns/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/xdns -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors @@ -14,18 +14,18 @@ replace ( require ( github.com/miekg/dns v1.1.57 - go.osspkg.com/goppy/errors v0.1.2 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/plugins v0.1.2 - go.osspkg.com/goppy/xc v0.1.1 - go.osspkg.com/goppy/xlog v0.1.7 - go.osspkg.com/goppy/xnet v0.1.3 + go.osspkg.com/goppy/errors v0.2.0 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/plugins v0.2.0 + go.osspkg.com/goppy/xc v0.2.0 + go.osspkg.com/goppy/xlog v0.2.0 + go.osspkg.com/goppy/xnet v0.2.0 ) require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - go.osspkg.com/goppy/syscall v0.1.3 // indirect + go.osspkg.com/goppy/syscall v0.2.0 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.20.0 // indirect golang.org/x/sys v0.16.0 // indirect diff --git a/xlog/go.mod b/xlog/go.mod index afb32fd..6df6619 100644 --- a/xlog/go.mod +++ b/xlog/go.mod @@ -1,6 +1,6 @@ module go.osspkg.com/goppy/xlog -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/iosync => ../iosync @@ -9,8 +9,8 @@ replace ( require ( github.com/mailru/easyjson v0.7.7 - go.osspkg.com/goppy/iosync v0.1.5 - go.osspkg.com/goppy/xtest v0.1.4 + go.osspkg.com/goppy/iosync v0.2.0 + go.osspkg.com/goppy/xtest v0.2.0 ) require github.com/josharian/intern v1.0.0 // indirect diff --git a/xnet/go.mod b/xnet/go.mod index 01de161..a9be91e 100644 --- a/xnet/go.mod +++ b/xnet/go.mod @@ -1,12 +1,12 @@ module go.osspkg.com/goppy/xnet -go 1.18 +go 1.20 replace ( go.osspkg.com/goppy/errors => ../errors go.osspkg.com/goppy/syscall => ../syscall ) -require go.osspkg.com/goppy/errors v0.1.2 +require go.osspkg.com/goppy/errors v0.2.0 -require go.osspkg.com/goppy/syscall v0.1.3 // indirect +require go.osspkg.com/goppy/syscall v0.2.0 // indirect diff --git a/xtest/go.mod b/xtest/go.mod index 326d6b9..201850e 100644 --- a/xtest/go.mod +++ b/xtest/go.mod @@ -1,3 +1,3 @@ module go.osspkg.com/goppy/xtest -go 1.18 +go 1.20