mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-26 18:23:18 +01:00
Upstep Go dependencies (#340)
* Upstep Go dependencies * tiny linter fix * Tidy
This commit is contained in:
parent
5506a5ecbe
commit
67ac8db190
41
go.mod
41
go.mod
@ -3,7 +3,7 @@ module github.com/superseriousbusiness/gotosocial
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
codeberg.org/gruf/go-store v1.1.0
|
||||
codeberg.org/gruf/go-store v1.1.2
|
||||
github.com/ReneKroon/ttlcache v1.7.0
|
||||
github.com/buckket/go-blurhash v1.1.0
|
||||
github.com/coreos/go-oidc/v3 v3.1.0
|
||||
@ -16,38 +16,38 @@ require (
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/h2non/filetype v1.1.3
|
||||
github.com/jackc/pgconn v1.10.1
|
||||
github.com/jackc/pgx/v4 v4.14.0
|
||||
github.com/jackc/pgx/v4 v4.14.1
|
||||
github.com/microcosm-cc/bluemonday v1.0.16
|
||||
github.com/mitchellh/mapstructure v1.4.2
|
||||
github.com/mitchellh/mapstructure v1.4.3
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/oklog/ulid v1.3.1
|
||||
github.com/russross/blackfriday/v2 v2.1.0
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.9.0
|
||||
github.com/spf13/viper v1.10.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/superseriousbusiness/activity v1.0.1-0.20211113133524-56560b73ace8
|
||||
github.com/superseriousbusiness/exifremove v0.0.0-20210330092427-6acd27eac203
|
||||
github.com/superseriousbusiness/oauth2/v4 v4.3.2-SSB
|
||||
github.com/tdewolff/minify/v2 v2.9.22
|
||||
github.com/uptrace/bun v1.0.18
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.18
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.18
|
||||
github.com/uptrace/bun v1.0.19
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.19
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.19
|
||||
github.com/wagslane/go-password-validator v0.3.0
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871
|
||||
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
|
||||
golang.org/x/text v0.3.7
|
||||
modernc.org/sqlite v1.14.1
|
||||
modernc.org/sqlite v1.14.2
|
||||
mvdan.cc/xurls/v2 v2.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
codeberg.org/gruf/go-bytes v1.0.2 // indirect
|
||||
codeberg.org/gruf/go-errors v1.0.2 // indirect
|
||||
codeberg.org/gruf/go-errors v1.0.3 // indirect
|
||||
codeberg.org/gruf/go-fastpath v1.0.2 // indirect
|
||||
codeberg.org/gruf/go-hashenc v1.0.1 // indirect
|
||||
codeberg.org/gruf/go-logger v1.2.3 // indirect
|
||||
codeberg.org/gruf/go-logger v1.3.1 // indirect
|
||||
codeberg.org/gruf/go-mutexes v1.0.1 // indirect
|
||||
codeberg.org/gruf/go-nowish v1.0.2 // indirect
|
||||
codeberg.org/gruf/go-pools v1.0.2 // indirect
|
||||
@ -66,9 +66,10 @@ require (
|
||||
github.com/go-errors/errors v1.4.1 // indirect
|
||||
github.com/go-playground/locales v0.14.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20211206191508-7fd73a941850 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gorilla/context v1.1.1 // indirect
|
||||
@ -82,7 +83,7 @@ require (
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
|
||||
github.com/jackc/pgtype v1.9.0 // indirect
|
||||
github.com/jackc/pgtype v1.9.1 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
@ -99,26 +100,26 @@ require (
|
||||
github.com/spf13/cast v1.4.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tdewolff/parse/v2 v2.5.22 // indirect
|
||||
github.com/tdewolff/parse/v2 v2.5.23 // indirect
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
|
||||
github.com/ugorji/go/codec v1.2.6 // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
golang.org/x/mod v0.5.1 // indirect
|
||||
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
|
||||
golang.org/x/tools v0.1.7 // indirect
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
|
||||
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
|
||||
golang.org/x/tools v0.1.8 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.27.1 // indirect
|
||||
gopkg.in/ini.v1 v1.63.2 // indirect
|
||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
lukechampine.com/uint128 v1.1.1 // indirect
|
||||
modernc.org/cc/v3 v3.35.18 // indirect
|
||||
modernc.org/ccgo/v3 v3.12.73 // indirect
|
||||
modernc.org/libc v1.11.83 // indirect
|
||||
modernc.org/ccgo/v3 v3.12.92 // indirect
|
||||
modernc.org/libc v1.11.101 // indirect
|
||||
modernc.org/mathutil v1.4.1 // indirect
|
||||
modernc.org/memory v1.0.5 // indirect
|
||||
modernc.org/opt v0.1.1 // indirect
|
||||
|
218
go.sum
218
go.sum
@ -23,6 +23,10 @@ cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSU
|
||||
cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
|
||||
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
|
||||
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
|
||||
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
|
||||
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
|
||||
cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=
|
||||
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
@ -32,7 +36,7 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU=
|
||||
cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
@ -46,17 +50,16 @@ codeberg.org/gruf/go-bytes v1.0.0/go.mod h1:1v/ibfaosfXSZtRdW2rWaVrDXMc9E3bsi/M9
|
||||
codeberg.org/gruf/go-bytes v1.0.1/go.mod h1:1v/ibfaosfXSZtRdW2rWaVrDXMc9E3bsi/M9Ekx39cg=
|
||||
codeberg.org/gruf/go-bytes v1.0.2 h1:malqE42Ni+h1nnYWBUAJaDDtEzF4aeN4uPN8DfMNNvo=
|
||||
codeberg.org/gruf/go-bytes v1.0.2/go.mod h1:1v/ibfaosfXSZtRdW2rWaVrDXMc9E3bsi/M9Ekx39cg=
|
||||
codeberg.org/gruf/go-cache v1.1.1/go.mod h1:XSzglJd721RkWHIW7egiWBQEvGa1hwTNCv74PcBsZOk=
|
||||
codeberg.org/gruf/go-errors v1.0.1/go.mod h1:JwoVg0AAwQkk2UWtDjR1mXcQLK/U8bs4RB4nUJ/yTCE=
|
||||
codeberg.org/gruf/go-errors v1.0.2 h1:fKmNM/XDtCpRhQS7Wf/02nScUqEfOBZy08yqR0ysIcI=
|
||||
codeberg.org/gruf/go-errors v1.0.2/go.mod h1:JwoVg0AAwQkk2UWtDjR1mXcQLK/U8bs4RB4nUJ/yTCE=
|
||||
codeberg.org/gruf/go-cache v1.1.2/go.mod h1:/Dbc+xU72Op3hMn6x2PXF3NE9uIDFeS+sXPF00hN/7o=
|
||||
codeberg.org/gruf/go-errors v1.0.3 h1:R0Scg9hStLejjN7+x7IWKn5I3nOI+y7J0Oc2gBcUpDY=
|
||||
codeberg.org/gruf/go-errors v1.0.3/go.mod h1:rJ08LdIE79Jg8vZ2TGylz/I+tZ1UuMJkGK5mNambIfQ=
|
||||
codeberg.org/gruf/go-fastpath v1.0.1/go.mod h1:edveE/Kp3Eqi0JJm0lXYdkVrB28cNUkcb/bRGFTPqeI=
|
||||
codeberg.org/gruf/go-fastpath v1.0.2 h1:O3nuYPMXnN89dsgAwVFU5iCGINtPJdITWmbRe2an/iQ=
|
||||
codeberg.org/gruf/go-fastpath v1.0.2/go.mod h1:edveE/Kp3Eqi0JJm0lXYdkVrB28cNUkcb/bRGFTPqeI=
|
||||
codeberg.org/gruf/go-hashenc v1.0.1 h1:EBvNe2wW8IPMUqT1XihB6/IM6KMJDLMFBxIUvmsy1f8=
|
||||
codeberg.org/gruf/go-hashenc v1.0.1/go.mod h1:IfHhPCVScOiYmJLqdCQT9bYVS1nxNTV4ewMUvFWDPtc=
|
||||
codeberg.org/gruf/go-logger v1.2.3 h1:WJWs/v4s//d+gJE3PJEXWHkSIsRVP1u3Ukcg+mPIVk4=
|
||||
codeberg.org/gruf/go-logger v1.2.3/go.mod h1:tBduUc+Yb9vqGRxY9/FB0ZlYznSteLy/KmIANo7zFjA=
|
||||
codeberg.org/gruf/go-logger v1.3.1 h1:1f10GQAkVbd3gNdpfSNHOVfaTFLLS8ebuA7IRXd8n90=
|
||||
codeberg.org/gruf/go-logger v1.3.1/go.mod h1:tBduUc+Yb9vqGRxY9/FB0ZlYznSteLy/KmIANo7zFjA=
|
||||
codeberg.org/gruf/go-mutexes v1.0.1 h1:X9bZW74YSEplWWdCrVXAvue5ztw3w5hh+INdXTENu88=
|
||||
codeberg.org/gruf/go-mutexes v1.0.1/go.mod h1:y2hbGLkWVHhNyxBOIVsA3/y2QMm6RSrYsC3sLVZ4EXM=
|
||||
codeberg.org/gruf/go-nowish v1.0.0/go.mod h1:70nvICNcqQ9OHpF07N614Dyk7cpL5ToWU1K1ZVCec2s=
|
||||
@ -64,12 +67,13 @@ codeberg.org/gruf/go-nowish v1.0.2 h1:/y8g38x44sD8JeqBPCkzqLoe0pReR1CTF8p6jXCOG1
|
||||
codeberg.org/gruf/go-nowish v1.0.2/go.mod h1:70nvICNcqQ9OHpF07N614Dyk7cpL5ToWU1K1ZVCec2s=
|
||||
codeberg.org/gruf/go-pools v1.0.2 h1:B0X6yoCL9FVmnvyoizb1SYRwMYPWwEJBjPnBMM5ILos=
|
||||
codeberg.org/gruf/go-pools v1.0.2/go.mod h1:MjUV3H6IASyBeBPCyCr7wjPpSNu8E2N87LG4r4TAyok=
|
||||
codeberg.org/gruf/go-runners v1.0.0/go.mod h1:9gTrmMnO3d+50C+hVzcmGBf+zTuswReS278E2EMvnmw=
|
||||
codeberg.org/gruf/go-store v1.1.0 h1:0LJP6MoMDf5im/d4vq4CZsUQQkqVmigoGB9Nz+kStEo=
|
||||
codeberg.org/gruf/go-store v1.1.0/go.mod h1:jrISks8z/ND/FUpQX8zTlF7oTkHmKt4Sco+NdvSAzPg=
|
||||
codeberg.org/gruf/go-runners v1.1.1/go.mod h1:9gTrmMnO3d+50C+hVzcmGBf+zTuswReS278E2EMvnmw=
|
||||
codeberg.org/gruf/go-store v1.1.2 h1:yf7osOqSOlJ9WNsFdp8e6IZCfnoT6VoI66d5SuP4Nsg=
|
||||
codeberg.org/gruf/go-store v1.1.2/go.mod h1:1CVRMdBbR0drn5pwz01aDT1Yls9W66u7E5kBiP9F9jw=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
@ -77,16 +81,24 @@ github.com/ReneKroon/ttlcache v1.7.0 h1:8BkjFfrzVFXyrqnMtezAaJ6AHPSsVV10m6w28N/F
|
||||
github.com/ReneKroon/ttlcache v1.7.0/go.mod h1:8BGGzdumrIjWxdRx8zpK6L3oGMWvIXdvB2GD1cfvd+I=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/antonlindstrom/pgstore v0.0.0-20200229204646-b08ebf1105e0/go.mod h1:2Ti6VUHVxpC0VSmTZzEvpzysnaGAfGBOoMIz5ykPyyw=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
|
||||
github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw=
|
||||
@ -95,16 +107,27 @@ github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414
|
||||
github.com/buckket/go-blurhash v1.1.0 h1:X5M6r0LIvwdvKiUtiNcRL2YlmOfMzYobI3VCKCZc9Do=
|
||||
github.com/buckket/go-blurhash v1.1.0/go.mod h1:aT2iqo5W9vu9GpyoLErKfTHwgODsZp3bQfXjXJUxNb8=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/coreos/go-oidc/v3 v3.1.0 h1:6avEvcdvTa1qYsOZ6I5PRkSYHzpTNWgKYmaJfaYbrRw=
|
||||
@ -160,10 +183,14 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
|
||||
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
@ -195,7 +222,11 @@ github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
@ -214,13 +245,13 @@ github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
|
||||
github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo=
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
|
||||
github.com/goccy/go-json v0.4.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/goccy/go-json v0.5.1/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20211206191508-7fd73a941850 h1:PSPmmucxGiFBtbQcttHTUc4LQ3P09AW+ldO2qspyKdY=
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20211206191508-7fd73a941850/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||
@ -233,6 +264,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
@ -309,6 +341,7 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
||||
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
|
||||
@ -328,16 +361,21 @@ github.com/h2non/filetype v1.1.1/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy
|
||||
github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg=
|
||||
github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
|
||||
github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
|
||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
@ -347,16 +385,21 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=
|
||||
github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
|
||||
github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
|
||||
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
|
||||
@ -400,14 +443,14 @@ github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01C
|
||||
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
|
||||
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
|
||||
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
|
||||
github.com/jackc/pgtype v1.9.0 h1:/SH1RxEtltvJgsDqp3TbiTFApD3mey3iygpuEGeuBXk=
|
||||
github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgtype v1.9.1 h1:MJc2s0MFS8C3ok1wQTdQxWuXQcB6+HwAm5x1CzW7mf0=
|
||||
github.com/jackc/pgtype v1.9.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
|
||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
||||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
||||
github.com/jackc/pgx/v4 v4.14.0 h1:TgdrmgnM7VY72EuSQzBbBd4JA1RLqJolrw9nQVZABVc=
|
||||
github.com/jackc/pgx/v4 v4.14.0/go.mod h1:jT3ibf/A0ZVCp89rtCIN0zCJxcE74ypROmHEZYsG/j8=
|
||||
github.com/jackc/pgx/v4 v4.14.1 h1:71oo1KAGI6mXhLiTMn6iDFcp3e7+zon/capWjl2OEFU=
|
||||
github.com/jackc/pgx/v4 v4.14.1/go.mod h1:RgDuE4Z34o7XE92RpLsvFiOEfrAUT0Xt2KxvX73W06M=
|
||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
@ -415,6 +458,7 @@ github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
@ -424,6 +468,7 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
@ -435,9 +480,8 @@ github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd
|
||||
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kpango/fastime v1.0.16/go.mod h1:lVqUTcXmQnk1wriyvq5DElbRSRDC0XtqbXQRdz0Eo+g=
|
||||
github.com/kpango/glg v1.5.8/go.mod h1:HI0g/1T4dmUhdoT2isXHrCM4FeNjc+t7fZujjvqYIeQ=
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
@ -458,6 +502,7 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg=
|
||||
github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
|
||||
@ -466,6 +511,8 @@ github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcncea
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
@ -478,11 +525,13 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA=
|
||||
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc=
|
||||
github.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc=
|
||||
github.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
|
||||
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
@ -493,8 +542,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
|
||||
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
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=
|
||||
@ -504,6 +553,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
|
||||
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
@ -515,10 +565,12 @@ github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1ls
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@ -527,7 +579,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b h1:aUNXCGgukb4gtY99imuIeoh8Vr0GSwAlYxPAhqZrpFc=
|
||||
github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
@ -544,7 +607,7 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE=
|
||||
github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
@ -554,6 +617,7 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
@ -563,6 +627,7 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
|
||||
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
@ -575,8 +640,8 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0
|
||||
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/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
|
||||
github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk=
|
||||
github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4=
|
||||
github.com/spf13/viper v1.10.0 h1:mXH0UwHS4D2HwWZa75im4xIQynLfblmWV7qcWpfv0yk=
|
||||
github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
@ -598,8 +663,8 @@ github.com/superseriousbusiness/oauth2/v4 v4.3.2-SSB/go.mod h1:uYC/W92oVRJ49Vh1G
|
||||
github.com/tdewolff/minify/v2 v2.9.22 h1:PlmaAakaJHdMMdTTwjjsuSwIxKqWPTlvjTj6a/g/ILU=
|
||||
github.com/tdewolff/minify/v2 v2.9.22/go.mod h1:dNlaFdXaIxgSXh3UFASqjTY0/xjpDkkCsYHA1NCGnmQ=
|
||||
github.com/tdewolff/parse/v2 v2.5.21/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
|
||||
github.com/tdewolff/parse/v2 v2.5.22 h1:KXMHTyx4VTL6Zu9a94SULQalDMvtP5FQq10mnSfaoGs=
|
||||
github.com/tdewolff/parse/v2 v2.5.22/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
|
||||
github.com/tdewolff/parse/v2 v2.5.23 h1:hvndcHtCwc8W+G5IZcw5qYAoXM2StF0IiiulG6xO1z4=
|
||||
github.com/tdewolff/parse/v2 v2.5.23/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
|
||||
github.com/tdewolff/test v1.0.6 h1:76mzYJQ83Op284kMT+63iCNCI7NEERsIN8dLM+RiKr4=
|
||||
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
|
||||
github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 h1:G6Z6HvJuPjG6XfNGi/feOATzeJrfgTNJY+rGrHbA04E=
|
||||
@ -622,18 +687,19 @@ github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ
|
||||
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go v1.2.6 h1:tGiWC9HENWE2tqYycIqFTNorMmFRVhNwCpDOpWqnk8E=
|
||||
github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
|
||||
github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
|
||||
github.com/uptrace/bun v1.0.18 h1:F2UclG0HQQOy6lLS2NWOUKqzjO1j1s9AWe6aGysVlkk=
|
||||
github.com/uptrace/bun v1.0.18/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc=
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.18 h1:PZDvpQSrc7onj1SsGNKFHy4LDfobPtNKXWEbsCqr6q8=
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.18/go.mod h1:Zw3h+kaJKexgfsHi+0tAxZXx0iHh16lyvwXnnMHL7xc=
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.18 h1:Xc4zoBtS2lK47lDjA5J3K1p/JwGGKk50Yxhzzj2kwPY=
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.18/go.mod h1:A9R2zIMUL1MkIl5xYLzq/NHQ8PC2Ob3kRgegMs7obdA=
|
||||
github.com/uptrace/bun v1.0.19 h1:Jl5GbcnLqeo4mHLVbF+LvzVXiXTrwQOdIVvuMO+5zXI=
|
||||
github.com/uptrace/bun v1.0.19/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc=
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.19 h1:8vdHpXRq3rbNDRn13llLxJ52wa+aBBn7QI0Q7IyW/d8=
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.19/go.mod h1:VMmro4cCcjC7xAIeWYvRHv8V2nF+q2Tm36WK+poCeuo=
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.19 h1:Oy0scO7sXbVBk9k6xc2yFF/X1maW5UU6uqO6coX/5/8=
|
||||
github.com/uptrace/bun/dialect/sqlitedialect v1.0.19/go.mod h1:KXvO5WJYf+JNrabpLR9CdflPjOqbkIjoBalxePvoysU=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.14.0 h1:67bfuW9azCMwW/Jlq/C+VeihNpAuJMWkYPBig1gdi3A=
|
||||
@ -663,11 +729,14 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
|
||||
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
@ -687,14 +756,13 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/
|
||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
golang.org/x/crypto v0.0.0-20180527072434-ab813273cd59/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
@ -708,8 +776,8 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP
|
||||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI=
|
||||
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b h1:QAqMVf3pSa6eeTsuklijukjXBlj7Es2QQplab+/RbQ4=
|
||||
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -745,12 +813,14 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -759,6 +829,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@ -789,12 +860,14 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
|
||||
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 h1:0qxwC5n+ttVOINCBeRHO0nq9X7uy8SDsPoi5OaCdIEI=
|
||||
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@ -811,6 +884,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -830,6 +904,7 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -876,6 +951,7 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -889,13 +965,18 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk=
|
||||
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
@ -974,8 +1055,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
|
||||
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -1010,7 +1091,12 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk
|
||||
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
|
||||
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
|
||||
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
|
||||
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
|
||||
google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
|
||||
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
|
||||
google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@ -1071,6 +1157,17 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr
|
||||
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
|
||||
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
@ -1096,6 +1193,8 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
|
||||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
@ -1111,6 +1210,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@ -1122,15 +1222,17 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8
|
||||
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
|
||||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.63.2 h1:tGK/CyBg7SMzb60vP1M03vNZ3VDu3wGQJwn7Sxi9r3c=
|
||||
gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
|
||||
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI=
|
||||
gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
@ -1196,8 +1298,16 @@ modernc.org/ccgo/v3 v3.12.60/go.mod h1:k/Nn0zdO1xHVWjPYVshDeWKqbRWIfif5dtsIOCUVM
|
||||
modernc.org/ccgo/v3 v3.12.65/go.mod h1:D6hQtKxPNZiY6wDBtehSGKFKmyXn53F8nGTpH+POmS4=
|
||||
modernc.org/ccgo/v3 v3.12.66/go.mod h1:jUuxlCFZTUZLMV08s7B1ekHX5+LIAurKTTaugUr/EhQ=
|
||||
modernc.org/ccgo/v3 v3.12.67/go.mod h1:Bll3KwKvGROizP2Xj17GEGOTrlvB1XcVaBrC90ORO84=
|
||||
modernc.org/ccgo/v3 v3.12.73 h1:AMk4wEpzWjpODXohKvvnlwLob4Xk8tq3we6CwYh88mA=
|
||||
modernc.org/ccgo/v3 v3.12.73/go.mod h1:hngkB+nUUqzOf3iqsM48Gf1FZhY599qzVg1iX+BT3cQ=
|
||||
modernc.org/ccgo/v3 v3.12.81/go.mod h1:p2A1duHoBBg1mFtYvnhAnQyI6vL0uw5PGYLSIgF6rYY=
|
||||
modernc.org/ccgo/v3 v3.12.82/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w=
|
||||
modernc.org/ccgo/v3 v3.12.84/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w=
|
||||
modernc.org/ccgo/v3 v3.12.86/go.mod h1:dN7S26DLTgVSni1PVA3KxxHTcykyDurf3OgUzNqTSrU=
|
||||
modernc.org/ccgo/v3 v3.12.90/go.mod h1:obhSc3CdivCRpYZmrvO88TXlW0NvoSVvdh/ccRjJYko=
|
||||
modernc.org/ccgo/v3 v3.12.92 h1:QT2o1iX5IMsKo0MQ9jKXKb5th+J1pDECtn0BXNB85bE=
|
||||
modernc.org/ccgo/v3 v3.12.92/go.mod h1:5yDdN7ti9KWPi5bRVWPl8UNhpEAtCjuEE7ayQnzzqHA=
|
||||
modernc.org/ccorpus v1.11.1 h1:K0qPfpVG1MJh5BYazccnmhywH4zHuOgJXgbjzyp6dWA=
|
||||
modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
|
||||
modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w=
|
||||
@ -1233,8 +1343,12 @@ modernc.org/libc v1.11.70/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw=
|
||||
modernc.org/libc v1.11.71/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw=
|
||||
modernc.org/libc v1.11.75/go.mod h1:dGRVugT6edz361wmD9gk6ax1AbDSe0x5vji0dGJiPT0=
|
||||
modernc.org/libc v1.11.82/go.mod h1:NF+Ek1BOl2jeC7lw3a7Jj5PWyHPwWD4aq3wVKxqV1fI=
|
||||
modernc.org/libc v1.11.83 h1:WmbgzryG15U1WViAd73q2WJGLLMczZCT0YJWjW6A8mo=
|
||||
modernc.org/libc v1.11.83/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE=
|
||||
modernc.org/libc v1.11.86/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE=
|
||||
modernc.org/libc v1.11.87/go.mod h1:Qvd5iXTeLhI5PS0XSyqMY99282y+3euapQFxM7jYnpY=
|
||||
modernc.org/libc v1.11.88/go.mod h1:h3oIVe8dxmTcchcFuCcJ4nAWaoiwzKCdv82MM0oiIdQ=
|
||||
modernc.org/libc v1.11.98/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c=
|
||||
modernc.org/libc v1.11.101 h1:mFp54enlBZiH0d26tRFoq2WL8KsjV1sefpOy4+gyTDQ=
|
||||
modernc.org/libc v1.11.101/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI=
|
||||
modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
@ -1245,8 +1359,8 @@ modernc.org/memory v1.0.5 h1:XRch8trV7GgvTec2i7jc33YlUI0RKVDBvZ5eZ5m8y14=
|
||||
modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM=
|
||||
modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A=
|
||||
modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.14.1 h1:jthfQCbWKfbK/lvZSjFEpBk0QzIBN6pQbFdDqBMR490=
|
||||
modernc.org/sqlite v1.14.1/go.mod h1:04Lqa+3PuAEUhAPAPWeDMljT4UYA31nb2DHTFG47L1g=
|
||||
modernc.org/sqlite v1.14.2 h1:ohsW2+e+Qe2To1W6GNezzKGwjXwSax6R+CrhRxVaFbE=
|
||||
modernc.org/sqlite v1.14.2/go.mod h1:yqfn85u8wVOE6ub5UT8VI9JjhrwBUUCNyTACN0h6Sx8=
|
||||
modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs=
|
||||
modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=
|
||||
modernc.org/tcl v1.8.13 h1:V0sTNBw0Re86PvXZxuCub3oO9WrSTqALgrwNZNvLFGw=
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror" //nolint:typecheck
|
||||
)
|
||||
|
||||
// InboxPOSTHandler deals with incoming POST requests to an actor's inbox.
|
||||
|
71
vendor/codeberg.org/gruf/go-errors/data.go
generated
vendored
71
vendor/codeberg.org/gruf/go-errors/data.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package errors
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"codeberg.org/gruf/go-bytes"
|
||||
@ -9,10 +10,9 @@
|
||||
|
||||
// global logfmt data formatter.
|
||||
var logfmt = logger.TextFormat{
|
||||
Strict: logger.DefaultTextFormat.Strict,
|
||||
MaxDepth: logger.DefaultTextFormat.MaxDepth,
|
||||
Levels: nil,
|
||||
TimeFormat: logger.DefaultTextFormat.TimeFormat,
|
||||
Strict: false,
|
||||
Verbose: true,
|
||||
MaxDepth: 10,
|
||||
}
|
||||
|
||||
// KV is a structure for setting key-value pairs in ErrorData.
|
||||
@ -30,50 +30,77 @@ type ErrorData interface {
|
||||
// Append adds the supplied key-values to ErrorData, similar keys DO overwrite
|
||||
Append(...KV)
|
||||
|
||||
// String returns a string representation of the ErrorData
|
||||
String() string
|
||||
// Implement byte slice representation formatter.
|
||||
logger.Formattable
|
||||
|
||||
// Implement string representation formatter.
|
||||
fmt.Stringer
|
||||
}
|
||||
|
||||
// NewData returns a new ErrorData implementation.
|
||||
func NewData() ErrorData {
|
||||
return &errorData{
|
||||
data: make(map[string]interface{}, 10),
|
||||
data: make([]KV, 0, 10),
|
||||
}
|
||||
}
|
||||
|
||||
// errorData is our ErrorData implementation, this is essentially
|
||||
// just a thread-safe string-interface map implementation.
|
||||
type errorData struct {
|
||||
data map[string]interface{}
|
||||
buf bytes.Buffer
|
||||
data []KV
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
func (d *errorData) set(key string, value interface{}) {
|
||||
for i := range d.data {
|
||||
if d.data[i].Key == key {
|
||||
// Found existing, update!
|
||||
d.data[i].Value = value
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Add new KV entry to slice
|
||||
d.data = append(d.data, KV{
|
||||
Key: key,
|
||||
Value: value,
|
||||
})
|
||||
}
|
||||
|
||||
func (d *errorData) Value(key string) (interface{}, bool) {
|
||||
d.mu.Lock()
|
||||
v, ok := d.data[key]
|
||||
for i := range d.data {
|
||||
if d.data[i].Key == key {
|
||||
v := d.data[i].Value
|
||||
d.mu.Unlock()
|
||||
return v, true
|
||||
}
|
||||
}
|
||||
d.mu.Unlock()
|
||||
return v, ok
|
||||
return nil, false
|
||||
}
|
||||
|
||||
func (d *errorData) Append(kvs ...KV) {
|
||||
d.mu.Lock()
|
||||
for i := range kvs {
|
||||
k := kvs[i].Key
|
||||
v := kvs[i].Value
|
||||
d.data[k] = v
|
||||
d.set(kvs[i].Key, kvs[i].Value)
|
||||
}
|
||||
d.mu.Unlock()
|
||||
}
|
||||
|
||||
func (d *errorData) String() string {
|
||||
func (d *errorData) AppendFormat(b []byte) []byte {
|
||||
buf := bytes.Buffer{B: b}
|
||||
d.mu.Lock()
|
||||
|
||||
d.buf.Reset()
|
||||
d.buf.B = append(d.buf.B, '{')
|
||||
logfmt.AppendFields(&d.buf, d.data)
|
||||
d.buf.B = append(d.buf.B, '}')
|
||||
|
||||
buf.B = append(buf.B, '{')
|
||||
for i := range d.data {
|
||||
logfmt.AppendKey(&buf, d.data[i].Key)
|
||||
logfmt.AppendValue(&buf, d.data[i].Value)
|
||||
}
|
||||
buf.B = append(buf.B, '}')
|
||||
d.mu.Unlock()
|
||||
return d.buf.StringPtr()
|
||||
return buf.B
|
||||
}
|
||||
|
||||
func (d *errorData) String() string {
|
||||
return string(d.AppendFormat(nil))
|
||||
}
|
||||
|
20
vendor/codeberg.org/gruf/go-logger/default.go
generated
vendored
20
vendor/codeberg.org/gruf/go-logger/default.go
generated
vendored
@ -76,6 +76,16 @@ func Logf(lvl LEVEL, s string, a ...interface{}) {
|
||||
Default().Logf(lvl, s, a...)
|
||||
}
|
||||
|
||||
// LogFields prints the provided fields formatted as key-value pairs at the supplied log level to the global Logger instance.
|
||||
func LogFields(lvl LEVEL, fields map[string]interface{}) {
|
||||
Default().LogFields(lvl, fields)
|
||||
}
|
||||
|
||||
// LogValues prints the provided values formatted as-so at the supplied log level to the global Logger instance.
|
||||
func LogValues(lvl LEVEL, a ...interface{}) {
|
||||
Default().LogValues(lvl, a...)
|
||||
}
|
||||
|
||||
// Print simply prints provided arguments to the global Logger instance.
|
||||
func Print(a ...interface{}) {
|
||||
Default().Print(a...)
|
||||
@ -85,3 +95,13 @@ func Print(a ...interface{}) {
|
||||
func Printf(s string, a ...interface{}) {
|
||||
Default().Printf(s, a...)
|
||||
}
|
||||
|
||||
// PrintFields prints the provided fields formatted as key-value pairs to the global Logger instance.
|
||||
func PrintFields(fields map[string]interface{}) {
|
||||
Default().PrintFields(fields)
|
||||
}
|
||||
|
||||
// PrintValues prints the provided values formatted as-so to the global Logger instance.
|
||||
func PrintValues(a ...interface{}) {
|
||||
Default().PrintValues(a...)
|
||||
}
|
||||
|
257
vendor/codeberg.org/gruf/go-logger/entry.go
generated
vendored
257
vendor/codeberg.org/gruf/go-logger/entry.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"codeberg.org/gruf/go-bytes"
|
||||
@ -61,149 +62,281 @@ func (e *Entry) Hooks() *Entry {
|
||||
return e
|
||||
}
|
||||
|
||||
// Byte appends a byte value as key-value pair to the log entry
|
||||
func (e *Entry) Byte(key string, value byte) *Entry {
|
||||
e.log.Format.AppendByteField(e.buf, key, value)
|
||||
// Byte appends a byte value to the log entry
|
||||
func (e *Entry) Byte(value byte) *Entry {
|
||||
e.log.Format.AppendByte(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Bytes appends a byte slice value as key-value pair to the log entry
|
||||
func (e *Entry) Bytes(key string, value []byte) *Entry {
|
||||
e.log.Format.AppendBytesField(e.buf, key, value)
|
||||
// ByteField appends a byte value as key-value pair to the log entry
|
||||
func (e *Entry) ByteField(key string, value byte) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendByte(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Str appends a string value as key-value pair to the log entry
|
||||
func (e *Entry) Str(key string, value string) *Entry {
|
||||
e.log.Format.AppendStringField(e.buf, key, value)
|
||||
// Bytes appends a byte slice value as to the log entry
|
||||
func (e *Entry) Bytes(value []byte) *Entry {
|
||||
e.log.Format.AppendBytes(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Strs appends a string slice value as key-value pair to the log entry
|
||||
func (e *Entry) Strs(key string, value []string) *Entry {
|
||||
e.log.Format.AppendStringsField(e.buf, key, value)
|
||||
// BytesField appends a byte slice value as key-value pair to the log entry
|
||||
func (e *Entry) BytesField(key string, value []byte) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendBytes(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Int appends an int value as key-value pair to the log entry
|
||||
func (e *Entry) Int(key string, value int) *Entry {
|
||||
e.log.Format.AppendIntField(e.buf, key, value)
|
||||
// Str appends a string value to the log entry
|
||||
func (e *Entry) Str(value string) *Entry {
|
||||
e.log.Format.AppendString(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Ints appends an int slice value as key-value pair to the log entry
|
||||
func (e *Entry) Ints(key string, value []int) *Entry {
|
||||
e.log.Format.AppendIntsField(e.buf, key, value)
|
||||
// StrField appends a string value as key-value pair to the log entry
|
||||
func (e *Entry) StrField(key string, value string) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendString(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Uint appends a uint value as key-value pair to the log entry
|
||||
func (e *Entry) Uint(key string, value uint) *Entry {
|
||||
e.log.Format.AppendUintField(e.buf, key, value)
|
||||
// Strs appends a string slice value to the log entry
|
||||
func (e *Entry) Strs(value []string) *Entry {
|
||||
e.log.Format.AppendStrings(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Uints appends a uint slice value as key-value pair to the log entry
|
||||
func (e *Entry) Uints(key string, value []uint) *Entry {
|
||||
e.log.Format.AppendUintsField(e.buf, key, value)
|
||||
// StrsField appends a string slice value as key-value pair to the log entry
|
||||
func (e *Entry) StrsField(key string, value []string) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendStrings(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Float appends a float value as key-value pair to the log entry
|
||||
func (e *Entry) Float(key string, value float64) *Entry {
|
||||
e.log.Format.AppendFloatField(e.buf, key, value)
|
||||
// Int appends an int value to the log entry
|
||||
func (e *Entry) Int(value int) *Entry {
|
||||
e.log.Format.AppendInt(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Floats appends a float slice value as key-value pair to the log entry
|
||||
func (e *Entry) Floats(key string, value []float64) *Entry {
|
||||
e.log.Format.AppendFloatsField(e.buf, key, value)
|
||||
// IntField appends an int value as key-value pair to the log entry
|
||||
func (e *Entry) IntField(key string, value int) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendInt(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Bool appends a bool value as key-value pair to the log entry
|
||||
func (e *Entry) Bool(key string, value bool) *Entry {
|
||||
e.log.Format.AppendBoolField(e.buf, key, value)
|
||||
// Ints appends an int slice value to the log entry
|
||||
func (e *Entry) Ints(value []int) *Entry {
|
||||
e.log.Format.AppendInts(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Bools appends a bool slice value as key-value pair to the log entry
|
||||
func (e *Entry) Bools(key string, value []bool) *Entry {
|
||||
e.log.Format.AppendBoolsField(e.buf, key, value)
|
||||
// IntsField appends an int slice value as key-value pair to the log entry
|
||||
func (e *Entry) IntsField(key string, value []int) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendInts(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Time appends a time.Time value as key-value pair to the log entry
|
||||
func (e *Entry) Time(key string, value time.Time) *Entry {
|
||||
e.log.Format.AppendTimeField(e.buf, key, value)
|
||||
// Uint appends a uint value to the log entry
|
||||
func (e *Entry) Uint(value uint) *Entry {
|
||||
e.log.Format.AppendUint(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Times appends a time.Time slice value as key-value pair to the log entry
|
||||
func (e *Entry) Times(key string, value []time.Time) *Entry {
|
||||
e.log.Format.AppendTimesField(e.buf, key, value)
|
||||
// UintField appends a uint value as key-value pair to the log entry
|
||||
func (e *Entry) UintField(key string, value uint) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendUint(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Duration appends a time.Duration value as key-value pair to the log entry
|
||||
func (e *Entry) Duration(key string, value time.Duration) *Entry {
|
||||
e.log.Format.AppendDurationField(e.buf, key, value)
|
||||
// Uints appends a uint slice value to the log entry
|
||||
func (e *Entry) Uints(value []uint) *Entry {
|
||||
e.log.Format.AppendUints(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Durations appends a time.Duration slice value as key-value pair to the log entry
|
||||
func (e *Entry) Durations(key string, value []time.Duration) *Entry {
|
||||
e.log.Format.AppendDurationsField(e.buf, key, value)
|
||||
// UintsField appends a uint slice value as key-value pair to the log entry
|
||||
func (e *Entry) UintsField(key string, value []uint) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendUints(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Float appends a float value to the log entry
|
||||
func (e *Entry) Float(value float64) *Entry {
|
||||
e.log.Format.AppendFloat(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// FloatField appends a float value as key-value pair to the log entry
|
||||
func (e *Entry) FloatField(key string, value float64) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendFloat(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Floats appends a float slice value to the log entry
|
||||
func (e *Entry) Floats(value []float64) *Entry {
|
||||
e.log.Format.AppendFloats(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// FloatsField appends a float slice value as key-value pair to the log entry
|
||||
func (e *Entry) FloatsField(key string, value []float64) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendFloats(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Bool appends a bool value to the log entry
|
||||
func (e *Entry) Bool(value bool) *Entry {
|
||||
e.log.Format.AppendBool(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// BoolField appends a bool value as key-value pair to the log entry
|
||||
func (e *Entry) BoolField(key string, value bool) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendBool(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Bools appends a bool slice value to the log entry
|
||||
func (e *Entry) Bools(value []bool) *Entry {
|
||||
e.log.Format.AppendBools(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// BoolsField appends a bool slice value as key-value pair to the log entry
|
||||
func (e *Entry) BoolsField(key string, value []bool) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendBools(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Time appends a time.Time value to the log entry
|
||||
func (e *Entry) Time(value time.Time) *Entry {
|
||||
e.log.Format.AppendTime(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// TimeField appends a time.Time value as key-value pair to the log entry
|
||||
func (e *Entry) TimeField(key string, value time.Time) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendTime(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Times appends a time.Time slice value to the log entry
|
||||
func (e *Entry) Times(value []time.Time) *Entry {
|
||||
e.log.Format.AppendTimes(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// TimesField appends a time.Time slice value as key-value pair to the log entry
|
||||
func (e *Entry) TimesField(key string, value []time.Time) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendTimes(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// DurationField appends a time.Duration value to the log entry
|
||||
func (e *Entry) Duration(value time.Duration) *Entry {
|
||||
e.log.Format.AppendDuration(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// DurationField appends a time.Duration value as key-value pair to the log entry
|
||||
func (e *Entry) DurationField(key string, value time.Duration) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendDuration(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Durations appends a time.Duration slice value to the log entry
|
||||
func (e *Entry) Durations(value []time.Duration) *Entry {
|
||||
e.log.Format.AppendDurations(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// DurationsField appends a time.Duration slice value as key-value pair to the log entry
|
||||
func (e *Entry) DurationsField(key string, value []time.Duration) *Entry {
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendDurations(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Field appends an interface value as key-value pair to the log entry
|
||||
func (e *Entry) Field(key string, value interface{}) *Entry {
|
||||
e.log.Format.AppendField(e.buf, key, value)
|
||||
e.log.Format.AppendKey(e.buf, key)
|
||||
e.log.Format.AppendValue(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Fields appends a map of key-value pairs to the log entry
|
||||
func (e *Entry) Fields(fields map[string]interface{}) *Entry {
|
||||
e.log.Format.AppendFields(e.buf, fields)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Value appends the given value to the log entry formatted as a value, without a key.
|
||||
func (e *Entry) Value(value interface{}) *Entry {
|
||||
e.log.Format.AppendValue(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
for key, value := range fields {
|
||||
e.Field(key, value)
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
// Values appends the given values to the log entry formatted as values, without a key.
|
||||
func (e *Entry) Values(values ...interface{}) *Entry {
|
||||
e.log.Format.AppendValues(e.buf, values)
|
||||
for _, value := range values {
|
||||
e.log.Format.AppendValue(e.buf, value)
|
||||
e.buf.WriteByte(' ')
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
// Append will append the given args formatted using fmt.Sprint(a...) to the Entry.
|
||||
func (e *Entry) Append(a ...interface{}) *Entry {
|
||||
fmt.Fprint(e.buf, a...)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
||||
// Args appends the given args formatted using the log formatter (usually faster than printf) without any key-value / value formatting.
|
||||
func (e *Entry) Args(a ...interface{}) *Entry {
|
||||
e.log.Format.AppendArgs(e.buf, a)
|
||||
// Appendf will append the given format string and args using fmt.Sprintf(s, a...) to the Entry.
|
||||
func (e *Entry) Appendf(s string, a ...interface{}) *Entry {
|
||||
fmt.Fprintf(e.buf, s, a...)
|
||||
e.buf.WriteByte(' ')
|
||||
return e
|
||||
}
|
||||
|
91
vendor/codeberg.org/gruf/go-logger/format.go
generated
vendored
91
vendor/codeberg.org/gruf/go-logger/format.go
generated
vendored
@ -9,76 +9,75 @@
|
||||
// Check our types impl LogFormat
|
||||
var _ LogFormat = &TextFormat{}
|
||||
|
||||
// Formattable defines a type capable of writing a string formatted form
|
||||
// of itself to a supplied byte buffer, and returning the resulting byte
|
||||
// buffer. Implementing this will greatly speed up formatting of custom
|
||||
// types passed to LogFormat (assuming they implement checking for this).
|
||||
type Formattable interface {
|
||||
AppendFormat([]byte) []byte
|
||||
}
|
||||
|
||||
// LogFormat defines a method of formatting log entries
|
||||
type LogFormat interface {
|
||||
// AppendLevel appends given log level to the log buffer
|
||||
// AppendKey appends given key to the log buffer
|
||||
AppendKey(buf *bytes.Buffer, key string)
|
||||
|
||||
// AppendLevel appends given log level as key-value pair to the log buffer
|
||||
AppendLevel(buf *bytes.Buffer, lvl LEVEL)
|
||||
|
||||
// AppendTimestamp appends given time format string to the log buffer
|
||||
// AppendTimestamp appends given timestamp string as key-value pair to the log buffer
|
||||
AppendTimestamp(buf *bytes.Buffer, fmtNow string)
|
||||
|
||||
// AppendField appends given key-value pair to the log buffer
|
||||
AppendField(buf *bytes.Buffer, key string, value interface{})
|
||||
|
||||
// AppendFields appends given key-values pairs to the log buffer
|
||||
AppendFields(buf *bytes.Buffer, fields map[string]interface{})
|
||||
|
||||
// AppendValue appends given interface formatted as value to the log buffer
|
||||
AppendValue(buf *bytes.Buffer, value interface{})
|
||||
|
||||
// AppendValues appends given interfaces formatted as values to the log buffer
|
||||
AppendValues(buf *bytes.Buffer, slice []interface{})
|
||||
// AppendByte appends given byte value to the log buffer
|
||||
AppendByte(buf *bytes.Buffer, value byte)
|
||||
|
||||
// AppendArgs appends given interfaces raw to the log buffer
|
||||
AppendArgs(buf *bytes.Buffer, args []interface{})
|
||||
// AppendBytes appends given byte slice value to the log buffer
|
||||
AppendBytes(buf *bytes.Buffer, value []byte)
|
||||
|
||||
// AppendByteField appends given byte value as key-value pair to the log buffer
|
||||
AppendByteField(buf *bytes.Buffer, key string, value byte)
|
||||
// AppendString appends given string value to the log buffer
|
||||
AppendString(buf *bytes.Buffer, value string)
|
||||
|
||||
// AppendBytesField appends given byte slice value as key-value pair to the log buffer
|
||||
AppendBytesField(buf *bytes.Buffer, key string, value []byte)
|
||||
// AppendStrings appends given string slice value to the log buffer
|
||||
AppendStrings(buf *bytes.Buffer, value []string)
|
||||
|
||||
// AppendStringField appends given string value as key-value pair to the log buffer
|
||||
AppendStringField(buf *bytes.Buffer, key string, value string)
|
||||
// AppendBool appends given bool value to the log buffer
|
||||
AppendBool(buf *bytes.Buffer, value bool)
|
||||
|
||||
// AppendStringsField appends given string slice value as key-value pair to the log buffer
|
||||
AppendStringsField(buf *bytes.Buffer, key string, value []string)
|
||||
// AppendBools appends given bool slice value to the log buffer
|
||||
AppendBools(buf *bytes.Buffer, value []bool)
|
||||
|
||||
// AppendBoolField appends given bool value as key-value pair to the log buffer
|
||||
AppendBoolField(buf *bytes.Buffer, key string, value bool)
|
||||
// AppendInt appends given int value to the log buffer
|
||||
AppendInt(buf *bytes.Buffer, value int)
|
||||
|
||||
// AppendBoolsField appends given bool slice value as key-value pair to the log buffer
|
||||
AppendBoolsField(buf *bytes.Buffer, key string, value []bool)
|
||||
// AppendInts appends given int slice value to the log buffer
|
||||
AppendInts(buf *bytes.Buffer, value []int)
|
||||
|
||||
// AppendIntField appends given int value as key-value pair to the log buffer
|
||||
AppendIntField(buf *bytes.Buffer, key string, value int)
|
||||
// AppendUint appends given uint value to the log buffer
|
||||
AppendUint(buf *bytes.Buffer, value uint)
|
||||
|
||||
// AppendIntsField appends given int slice value as key-value pair to the log buffer
|
||||
AppendIntsField(buf *bytes.Buffer, key string, value []int)
|
||||
// AppendUints appends given uint slice value to the log buffer
|
||||
AppendUints(buf *bytes.Buffer, value []uint)
|
||||
|
||||
// AppendUintField appends given uint value as key-value pair to the log buffer
|
||||
AppendUintField(buf *bytes.Buffer, key string, value uint)
|
||||
// AppendFloat appends given float value to the log buffer
|
||||
AppendFloat(buf *bytes.Buffer, value float64)
|
||||
|
||||
// AppendUintsField appends given uint slice value as key-value pair to the log buffer
|
||||
AppendUintsField(buf *bytes.Buffer, key string, value []uint)
|
||||
// AppendFloats appends given float slice value to the log buffer
|
||||
AppendFloats(buf *bytes.Buffer, value []float64)
|
||||
|
||||
// AppendFloatField appends given float value as key-value pair to the log buffer
|
||||
AppendFloatField(buf *bytes.Buffer, key string, value float64)
|
||||
// AppendTime appends given time value to the log buffer
|
||||
AppendTime(buf *bytes.Buffer, value time.Time)
|
||||
|
||||
// AppendFloatsField appends given float slice value as key-value pair to the log buffer
|
||||
AppendFloatsField(buf *bytes.Buffer, key string, value []float64)
|
||||
// AppendTimes appends given time slice value to the log buffer
|
||||
AppendTimes(buf *bytes.Buffer, value []time.Time)
|
||||
|
||||
// AppendTimeField appends given time value as key-value pair to the log buffer
|
||||
AppendTimeField(buf *bytes.Buffer, key string, value time.Time)
|
||||
// AppendDuration appends given duration value to the log buffer
|
||||
AppendDuration(buf *bytes.Buffer, value time.Duration)
|
||||
|
||||
// AppendTimesField appends given time slice value as key-value pair to the log buffer
|
||||
AppendTimesField(buf *bytes.Buffer, key string, value []time.Time)
|
||||
|
||||
// AppendDurationField appends given duration value as key-value pair to the log buffer
|
||||
AppendDurationField(buf *bytes.Buffer, key string, value time.Duration)
|
||||
|
||||
// AppendDurationsField appends given duration slice value as key-value pair to the log buffer
|
||||
AppendDurationsField(buf *bytes.Buffer, key string, value []time.Duration)
|
||||
// AppendDurations appends given duration slice value to the log buffer
|
||||
AppendDurations(buf *bytes.Buffer, value []time.Duration)
|
||||
|
||||
// AppendMsg appends given msg as key-value pair to the log buffer using fmt.Sprint(...) formatting
|
||||
AppendMsg(buf *bytes.Buffer, a ...interface{})
|
||||
|
413
vendor/codeberg.org/gruf/go-logger/format_text.go
generated
vendored
413
vendor/codeberg.org/gruf/go-logger/format_text.go
generated
vendored
@ -12,49 +12,63 @@
|
||||
|
||||
// DefaultTextFormat is the default TextFormat instance
|
||||
var DefaultTextFormat = TextFormat{
|
||||
Strict: false,
|
||||
MaxDepth: 5,
|
||||
Levels: DefaultLevels(),
|
||||
TimeFormat: time.RFC1123,
|
||||
Strict: false,
|
||||
Verbose: false,
|
||||
MaxDepth: 10,
|
||||
Levels: DefaultLevels(),
|
||||
}
|
||||
|
||||
// TextFormat is the default LogFormat implementation, with very similar formatting to logfmt
|
||||
// TextFormat is the default LogFormat implementation, with very similar formatting to the
|
||||
// standard "fmt" package's '%#v' operator. The main difference being that pointers are
|
||||
// dereferenced as far as possible in order to reach a printable value. It is also *mildly* faster.
|
||||
type TextFormat struct {
|
||||
// Strict defines whether to use strict key-value pair formatting, i.e. should the level
|
||||
// timestamp and msg be formatted as key-value pairs (with forced quoting for msg)
|
||||
Strict bool
|
||||
|
||||
// Verbose defines whether to increase output verbosity, i.e. include types with nil values
|
||||
// and force values implementing .String() / .AppendFormat() to be printed as a struct etc.
|
||||
Verbose bool
|
||||
|
||||
// MaxDepth specifies the max depth of fields the formatter will iterate
|
||||
MaxDepth uint8
|
||||
|
||||
// Levels defines the map of log LEVELs to level strings
|
||||
Levels Levels
|
||||
|
||||
// TimeFormat specifies the time formatting to use
|
||||
TimeFormat string
|
||||
}
|
||||
|
||||
// fmt returns a new format instance based on receiver TextFormat and given buffer
|
||||
func (f TextFormat) fmt(buf *bytes.Buffer) format {
|
||||
var flags uint8
|
||||
if f.Verbose {
|
||||
flags |= vboseBit
|
||||
}
|
||||
return format{
|
||||
isKey: false,
|
||||
depth: 0,
|
||||
txt: f,
|
||||
flags: flags,
|
||||
depth: uint16(f.MaxDepth) << 8,
|
||||
buf: buf,
|
||||
}
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendKey(buf *bytes.Buffer, key string) {
|
||||
if len(key) > 0 {
|
||||
// only append if key is non-zero length
|
||||
appendString(f.fmt(buf).SetIsKey(true), key)
|
||||
buf.WriteByte('=')
|
||||
}
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendLevel(buf *bytes.Buffer, lvl LEVEL) {
|
||||
if f.Strict {
|
||||
// Strict format, append level key
|
||||
buf.WriteString(`level=`)
|
||||
buf.WriteString(f.Levels.LevelString(lvl))
|
||||
buf.WriteString(f.Levels.Get(lvl))
|
||||
return
|
||||
}
|
||||
|
||||
// Write level string
|
||||
buf.WriteByte('[')
|
||||
buf.WriteString(f.Levels.LevelString(lvl))
|
||||
buf.WriteString(f.Levels.Get(lvl))
|
||||
buf.WriteByte(']')
|
||||
}
|
||||
|
||||
@ -70,140 +84,71 @@ func (f TextFormat) AppendTimestamp(buf *bytes.Buffer, now string) {
|
||||
buf.WriteString(now)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendField(buf *bytes.Buffer, key string, value interface{}) {
|
||||
appendKey(buf, key)
|
||||
appendIfaceOrRValue(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendFields(buf *bytes.Buffer, fields map[string]interface{}) {
|
||||
fmt := f.fmt(buf)
|
||||
|
||||
// Append individual fields
|
||||
for key, value := range fields {
|
||||
appendKey(buf, key)
|
||||
appendIfaceOrRValue(fmt, value)
|
||||
buf.WriteByte(' ')
|
||||
}
|
||||
|
||||
// Drop last space
|
||||
if len(fields) > 0 {
|
||||
buf.Truncate(1)
|
||||
}
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendValue(buf *bytes.Buffer, value interface{}) {
|
||||
appendIfaceOrRValue(f.fmt(buf).IsKey(true), value)
|
||||
appendIfaceOrRValue(f.fmt(buf).SetIsKey(false), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendValues(buf *bytes.Buffer, values []interface{}) {
|
||||
// Prepare formatter
|
||||
fmt := f.fmt(buf).IsKey(true)
|
||||
|
||||
// Append each of the values
|
||||
for _, value := range values {
|
||||
appendIfaceOrRValue(fmt, value)
|
||||
buf.WriteByte(' ')
|
||||
}
|
||||
|
||||
// Drop last space
|
||||
if len(values) > 0 {
|
||||
buf.Truncate(1)
|
||||
}
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendArgs(buf *bytes.Buffer, args []interface{}) {
|
||||
// Prepare formatter
|
||||
fmt := f.fmt(buf).IsKey(true).IsRaw(true)
|
||||
|
||||
// Append each of the values
|
||||
for _, arg := range args {
|
||||
appendIfaceOrRValue(fmt, arg)
|
||||
buf.WriteByte(' ')
|
||||
}
|
||||
|
||||
// Drop last space
|
||||
if len(args) > 0 {
|
||||
buf.Truncate(1)
|
||||
}
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendByteField(buf *bytes.Buffer, key string, value byte) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendByte(buf *bytes.Buffer, value byte) {
|
||||
appendByte(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendBytesField(buf *bytes.Buffer, key string, value []byte) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendBytes(buf *bytes.Buffer, value []byte) {
|
||||
appendBytes(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendStringField(buf *bytes.Buffer, key string, value string) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendString(buf *bytes.Buffer, value string) {
|
||||
appendString(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendStringsField(buf *bytes.Buffer, key string, value []string) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendStrings(buf *bytes.Buffer, value []string) {
|
||||
appendStringSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendBoolField(buf *bytes.Buffer, key string, value bool) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendBool(buf *bytes.Buffer, value bool) {
|
||||
appendBool(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendBoolsField(buf *bytes.Buffer, key string, value []bool) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendBools(buf *bytes.Buffer, value []bool) {
|
||||
appendBoolSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendIntField(buf *bytes.Buffer, key string, value int) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendInt(buf *bytes.Buffer, value int) {
|
||||
appendInt(f.fmt(buf), int64(value))
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendIntsField(buf *bytes.Buffer, key string, value []int) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendInts(buf *bytes.Buffer, value []int) {
|
||||
appendIntSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendUintField(buf *bytes.Buffer, key string, value uint) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendUint(buf *bytes.Buffer, value uint) {
|
||||
appendUint(f.fmt(buf), uint64(value))
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendUintsField(buf *bytes.Buffer, key string, value []uint) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendUints(buf *bytes.Buffer, value []uint) {
|
||||
appendUintSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendFloatField(buf *bytes.Buffer, key string, value float64) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendFloat(buf *bytes.Buffer, value float64) {
|
||||
appendFloat(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendFloatsField(buf *bytes.Buffer, key string, value []float64) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendFloats(buf *bytes.Buffer, value []float64) {
|
||||
appendFloatSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendTimeField(buf *bytes.Buffer, key string, value time.Time) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendTime(buf *bytes.Buffer, value time.Time) {
|
||||
appendTime(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendTimesField(buf *bytes.Buffer, key string, value []time.Time) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendTimes(buf *bytes.Buffer, value []time.Time) {
|
||||
appendTimeSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendDurationField(buf *bytes.Buffer, key string, value time.Duration) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendDuration(buf *bytes.Buffer, value time.Duration) {
|
||||
appendDuration(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
func (f TextFormat) AppendDurationsField(buf *bytes.Buffer, key string, value []time.Duration) {
|
||||
appendKey(buf, key)
|
||||
func (f TextFormat) AppendDurations(buf *bytes.Buffer, value []time.Duration) {
|
||||
appendDurationSlice(f.fmt(buf), value)
|
||||
}
|
||||
|
||||
@ -233,46 +178,89 @@ func (f TextFormat) AppendMsgf(buf *bytes.Buffer, s string, a ...interface{}) {
|
||||
|
||||
// format is the object passed among the append___ formatting functions
|
||||
type format struct {
|
||||
raw bool
|
||||
isKey bool
|
||||
depth uint8
|
||||
txt TextFormat
|
||||
buf *bytes.Buffer
|
||||
flags uint8 // 'isKey' and 'verbose' flags
|
||||
depth uint16 // encoded as 0b(maxDepth)(curDepth)
|
||||
buf *bytes.Buffer // out buffer
|
||||
}
|
||||
|
||||
// IsKey returns format instance with key set to value
|
||||
func (f format) IsKey(is bool) format {
|
||||
const (
|
||||
// flag bit constants
|
||||
isKeyBit = uint8(1) << 0
|
||||
vboseBit = uint8(1) << 1
|
||||
)
|
||||
|
||||
// AtMaxDepth returns whether format is currently at max depth.
|
||||
func (f format) AtMaxDepth() bool {
|
||||
return uint8(f.depth) >= uint8(f.depth>>8)
|
||||
}
|
||||
|
||||
// IsKey returns whether the isKey flag is set.
|
||||
func (f format) IsKey() bool {
|
||||
return (f.flags & isKeyBit) != 0
|
||||
}
|
||||
|
||||
// Verbose returns whether the verbose flag is set.
|
||||
func (f format) Verbose() bool {
|
||||
return (f.flags & vboseBit) != 0
|
||||
}
|
||||
|
||||
// SetIsKey returns format instance with the isKey bit set to value.
|
||||
func (f format) SetIsKey(is bool) format {
|
||||
flags := f.flags
|
||||
if is {
|
||||
flags |= isKeyBit
|
||||
} else {
|
||||
flags &= ^isKeyBit
|
||||
}
|
||||
return format{
|
||||
raw: f.raw,
|
||||
isKey: is,
|
||||
flags: flags,
|
||||
depth: f.depth,
|
||||
txt: f.txt,
|
||||
buf: f.buf,
|
||||
}
|
||||
}
|
||||
|
||||
// IsRaw returns format instance with raw set to value
|
||||
func (f format) IsRaw(is bool) format {
|
||||
return format{
|
||||
raw: is,
|
||||
isKey: f.isKey,
|
||||
depth: f.depth,
|
||||
txt: f.txt,
|
||||
buf: f.buf,
|
||||
}
|
||||
}
|
||||
|
||||
// IncrDepth returns format instance with depth incremented
|
||||
// IncrDepth returns format instance with depth incremented.
|
||||
func (f format) IncrDepth() format {
|
||||
return format{
|
||||
raw: f.raw,
|
||||
isKey: f.isKey,
|
||||
depth: f.depth + 1,
|
||||
txt: f.txt,
|
||||
flags: f.flags,
|
||||
depth: (f.depth & 0b1111111100000000) | uint16(uint8(f.depth)+1),
|
||||
buf: f.buf,
|
||||
}
|
||||
}
|
||||
|
||||
// appendNilType writes nil to buf, type included if verbose.
|
||||
func appendNilType(fmt format, t string) {
|
||||
if fmt.Verbose() {
|
||||
fmt.buf.WriteByte('(')
|
||||
fmt.buf.WriteString(t)
|
||||
fmt.buf.WriteString(`)(nil)`)
|
||||
} else {
|
||||
fmt.buf.WriteString(`nil`)
|
||||
}
|
||||
}
|
||||
|
||||
// appendNilFace writes nil to buf, type included if verbose.
|
||||
func appendNilIface(fmt format, i interface{}) {
|
||||
if fmt.Verbose() {
|
||||
fmt.buf.WriteByte('(')
|
||||
fmt.buf.WriteString(reflect.TypeOf(i).String())
|
||||
fmt.buf.WriteString(`)(nil)`)
|
||||
} else {
|
||||
fmt.buf.WriteString(`nil`)
|
||||
}
|
||||
}
|
||||
|
||||
// appendNilRValue writes nil to buf, type included if verbose.
|
||||
func appendNilRValue(fmt format, v reflect.Value) {
|
||||
if fmt.Verbose() {
|
||||
fmt.buf.WriteByte('(')
|
||||
fmt.buf.WriteString(v.Type().String())
|
||||
fmt.buf.WriteString(`)(nil)`)
|
||||
} else {
|
||||
fmt.buf.WriteString(`nil`)
|
||||
}
|
||||
}
|
||||
|
||||
// appendByte writes a single byte to buf
|
||||
func appendByte(fmt format, b byte) {
|
||||
fmt.buf.WriteByte(b)
|
||||
@ -280,7 +268,7 @@ func appendByte(fmt format, b byte) {
|
||||
|
||||
// appendBytes writes a quoted byte slice to buf
|
||||
func appendBytes(fmt format, b []byte) {
|
||||
if !fmt.isKey && b == nil {
|
||||
if !fmt.IsKey() && b == nil {
|
||||
// Values CAN be nil formatted
|
||||
appendNilType(fmt, `[]byte`)
|
||||
} else {
|
||||
@ -290,19 +278,16 @@ func appendBytes(fmt format, b []byte) {
|
||||
|
||||
// appendString writes an escaped, double-quoted string to buf
|
||||
func appendString(fmt format, s string) {
|
||||
if !fmt.raw {
|
||||
// Only handle quoting if NOT raw
|
||||
if !strconv.CanBackquote(s) || !fmt.isKey {
|
||||
// All non-keys and multiline keys get quoted + escaped
|
||||
fmt.buf.B = strconv.AppendQuote(fmt.buf.B, s)
|
||||
return
|
||||
} else if containsSpaceOrTab(s) {
|
||||
// Key containing spaces/tabs, quote this
|
||||
fmt.buf.WriteByte('"')
|
||||
fmt.buf.WriteString(s)
|
||||
fmt.buf.WriteByte('"')
|
||||
return
|
||||
}
|
||||
if !fmt.IsKey() || !strconv.CanBackquote(s) {
|
||||
// All non-keys and multiline keys get quoted + escaped
|
||||
fmt.buf.B = strconv.AppendQuote(fmt.buf.B, s)
|
||||
return
|
||||
} else if containsSpaceOrTab(s) {
|
||||
// Key containing spaces/tabs, quote this
|
||||
fmt.buf.WriteByte('"')
|
||||
fmt.buf.WriteString(s)
|
||||
fmt.buf.WriteByte('"')
|
||||
return
|
||||
}
|
||||
|
||||
// Safe to leave unquoted
|
||||
@ -319,12 +304,9 @@ func appendStringSlice(fmt format, s []string) {
|
||||
|
||||
fmt.buf.WriteByte('[')
|
||||
|
||||
// Prepare formatter
|
||||
fmt = fmt.IsKey(false)
|
||||
|
||||
// Write elements
|
||||
for _, s := range s {
|
||||
appendString(fmt, s)
|
||||
appendString(fmt.SetIsKey(false), s)
|
||||
fmt.buf.WriteByte(',')
|
||||
}
|
||||
|
||||
@ -454,7 +436,7 @@ func appendFloatSlice(fmt format, f []float64) {
|
||||
|
||||
// appendTime writes a formatted, quoted time string to buf
|
||||
func appendTime(fmt format, t time.Time) {
|
||||
appendString(fmt.IsKey(true), t.Format(fmt.txt.TimeFormat))
|
||||
appendString(fmt.SetIsKey(true), t.Format(time.RFC1123))
|
||||
}
|
||||
|
||||
// appendTimeSlice writes a slice of formatted time strings to buf
|
||||
@ -467,12 +449,9 @@ func appendTimeSlice(fmt format, t []time.Time) {
|
||||
|
||||
fmt.buf.WriteByte('[')
|
||||
|
||||
// Prepare formatter
|
||||
fmt = fmt.IsKey(true)
|
||||
|
||||
// Write elements
|
||||
for _, t := range t {
|
||||
appendString(fmt, t.Format(fmt.txt.TimeFormat))
|
||||
appendString(fmt.SetIsKey(true), t.Format(time.RFC1123))
|
||||
fmt.buf.WriteByte(',')
|
||||
}
|
||||
|
||||
@ -486,7 +465,7 @@ func appendTimeSlice(fmt format, t []time.Time) {
|
||||
|
||||
// appendDuration writes a formatted, quoted duration string to buf
|
||||
func appendDuration(fmt format, d time.Duration) {
|
||||
appendString(fmt.IsKey(true), d.String())
|
||||
appendString(fmt.SetIsKey(true), d.String())
|
||||
}
|
||||
|
||||
// appendDurationSlice writes a slice of formatted, quoted duration strings to buf
|
||||
@ -499,12 +478,9 @@ func appendDurationSlice(fmt format, d []time.Duration) {
|
||||
|
||||
fmt.buf.WriteByte('[')
|
||||
|
||||
// Prepare formatter
|
||||
fmt = fmt.IsKey(true)
|
||||
|
||||
// Write elements
|
||||
for _, d := range d {
|
||||
appendString(fmt, d.String())
|
||||
appendString(fmt.SetIsKey(true), d.String())
|
||||
fmt.buf.WriteByte(',')
|
||||
}
|
||||
|
||||
@ -560,22 +536,10 @@ func notNil(i interface{}) bool {
|
||||
return (e.valueOf != nil)
|
||||
}
|
||||
|
||||
// appendNilType will append a formatted nil of type 't'
|
||||
func appendNilType(fmt format, t string) {
|
||||
fmt.buf.WriteByte('(')
|
||||
fmt.buf.WriteString(t)
|
||||
fmt.buf.WriteString(`)(<nil>)`)
|
||||
}
|
||||
|
||||
// appendNilValue will append a formatted nil of type fetched from value 'v'
|
||||
func appendNilRValue(fmt format, v reflect.Value) {
|
||||
appendNilType(fmt, v.Type().String())
|
||||
}
|
||||
|
||||
// appendIfaceOrReflectValue will attempt to append as interface, falling back to reflection
|
||||
func appendIfaceOrRValue(fmt format, i interface{}) {
|
||||
// appendIfaceOrRValueNext performs appendIfaceOrRValue checking + incr depth
|
||||
func appendIfaceOrRValueNext(fmt format, i interface{}) {
|
||||
// Check we haven't hit max
|
||||
if fmt.depth >= fmt.txt.MaxDepth {
|
||||
if fmt.AtMaxDepth() {
|
||||
fmt.buf.WriteString("...")
|
||||
return
|
||||
}
|
||||
@ -583,16 +547,21 @@ func appendIfaceOrRValue(fmt format, i interface{}) {
|
||||
// Incr the depth
|
||||
fmt = fmt.IncrDepth()
|
||||
|
||||
// Attempt to append interface, fallback to reflect
|
||||
// Make actual call
|
||||
appendIfaceOrRValue(fmt, i)
|
||||
}
|
||||
|
||||
// appendIfaceOrReflectValue will attempt to append as interface, falling back to reflection
|
||||
func appendIfaceOrRValue(fmt format, i interface{}) {
|
||||
if !appendIface(fmt, i) {
|
||||
appendRValue(fmt, reflect.ValueOf(i))
|
||||
}
|
||||
}
|
||||
|
||||
// appendReflectValueOrIface will attempt to interface the reflect.Value, falling back to using this directly
|
||||
func appendRValueOrIface(fmt format, v reflect.Value) {
|
||||
// appendValueOrIfaceNext performs appendRValueOrIface checking + incr depth
|
||||
func appendRValueOrIfaceNext(fmt format, v reflect.Value) {
|
||||
// Check we haven't hit max
|
||||
if fmt.depth >= fmt.txt.MaxDepth {
|
||||
if fmt.AtMaxDepth() {
|
||||
fmt.buf.WriteString("...")
|
||||
return
|
||||
}
|
||||
@ -600,7 +569,12 @@ func appendRValueOrIface(fmt format, v reflect.Value) {
|
||||
// Incr the depth
|
||||
fmt = fmt.IncrDepth()
|
||||
|
||||
// Attempt to interface reflect value, fallback to handling value itself
|
||||
// Make actual call
|
||||
appendRValueOrIface(fmt, v)
|
||||
}
|
||||
|
||||
// appendRValueOrIface will attempt to interface the reflect.Value, falling back to using this directly
|
||||
func appendRValueOrIface(fmt format, v reflect.Value) {
|
||||
if !v.CanInterface() || !appendIface(fmt, v.Interface()) {
|
||||
appendRValue(fmt, v)
|
||||
}
|
||||
@ -610,7 +584,7 @@ func appendRValueOrIface(fmt format, v reflect.Value) {
|
||||
func appendIface(fmt format, i interface{}) bool {
|
||||
switch i := i.(type) {
|
||||
case nil:
|
||||
fmt.buf.WriteString(`<nil>`)
|
||||
fmt.buf.WriteString(`nil`)
|
||||
case byte:
|
||||
appendByte(fmt, i)
|
||||
case []byte:
|
||||
@ -671,13 +645,35 @@ func appendIface(fmt format, i interface{}) bool {
|
||||
if notNil(i) /* use safer nil check */ {
|
||||
appendString(fmt, i.Error())
|
||||
} else {
|
||||
appendNilType(fmt, reflect.TypeOf(i).String())
|
||||
appendNilIface(fmt, i)
|
||||
}
|
||||
case Formattable:
|
||||
switch {
|
||||
// catch nil case first
|
||||
case !notNil(i):
|
||||
appendNilIface(fmt, i)
|
||||
|
||||
// not permitted
|
||||
case fmt.Verbose():
|
||||
return false
|
||||
|
||||
// use func
|
||||
default:
|
||||
fmt.buf.B = i.AppendFormat(fmt.buf.B)
|
||||
}
|
||||
case stdfmt.Stringer:
|
||||
if notNil(i) /* use safer nil check */ {
|
||||
switch {
|
||||
// catch nil case first
|
||||
case !notNil(i):
|
||||
appendNilIface(fmt, i)
|
||||
|
||||
// not permitted
|
||||
case fmt.Verbose():
|
||||
return false
|
||||
|
||||
// use func
|
||||
default:
|
||||
appendString(fmt, i.String())
|
||||
} else {
|
||||
appendNilType(fmt, reflect.TypeOf(i).String())
|
||||
}
|
||||
default:
|
||||
return false // could not handle
|
||||
@ -720,7 +716,7 @@ func appendRValue(fmt format, v reflect.Value) {
|
||||
fmt.buf.WriteString("0x")
|
||||
fmt.buf.B = strconv.AppendUint(fmt.buf.B, uint64(u), 16)
|
||||
} else {
|
||||
fmt.buf.WriteString(`<nil>`)
|
||||
fmt.buf.WriteString(`nil`)
|
||||
}
|
||||
fmt.buf.WriteByte(')')
|
||||
case reflect.Uintptr:
|
||||
@ -730,7 +726,7 @@ func appendRValue(fmt format, v reflect.Value) {
|
||||
fmt.buf.WriteString("0x")
|
||||
fmt.buf.B = strconv.AppendUint(fmt.buf.B, u, 16)
|
||||
} else {
|
||||
fmt.buf.WriteString(`<nil>`)
|
||||
fmt.buf.WriteString(`nil`)
|
||||
}
|
||||
fmt.buf.WriteByte(')')
|
||||
case reflect.String:
|
||||
@ -758,15 +754,11 @@ func appendIfaceMap(fmt format, v map[string]interface{}) {
|
||||
|
||||
fmt.buf.WriteByte('{')
|
||||
|
||||
// Prepare formatters
|
||||
fmtKey := fmt.IsKey(true)
|
||||
fmtVal := fmt.IsKey(false)
|
||||
|
||||
// Write map pairs!
|
||||
for key, value := range v {
|
||||
appendString(fmtKey, key)
|
||||
appendString(fmt.SetIsKey(true), key)
|
||||
fmt.buf.WriteByte('=')
|
||||
appendIfaceOrRValue(fmtVal, value)
|
||||
appendIfaceOrRValueNext(fmt.SetIsKey(false), value)
|
||||
fmt.buf.WriteByte(' ')
|
||||
}
|
||||
|
||||
@ -785,12 +777,9 @@ func appendArrayType(fmt format, v reflect.Value) {
|
||||
|
||||
fmt.buf.WriteByte('[')
|
||||
|
||||
// Prepare formatter
|
||||
fmt = fmt.IsKey(false)
|
||||
|
||||
// Write values
|
||||
for i := 0; i < n; i++ {
|
||||
appendRValueOrIface(fmt, v.Index(i))
|
||||
appendRValueOrIfaceNext(fmt.SetIsKey(false), v.Index(i))
|
||||
fmt.buf.WriteByte(',')
|
||||
}
|
||||
|
||||
@ -825,15 +814,11 @@ func appendMapType(fmt format, v reflect.Value) {
|
||||
|
||||
fmt.buf.WriteByte('{')
|
||||
|
||||
// Prepare formatters
|
||||
fmtKey := fmt.IsKey(true)
|
||||
fmtVal := fmt.IsKey(false)
|
||||
|
||||
// Iterate pairs
|
||||
for r.Next() {
|
||||
appendRValueOrIface(fmtKey, r.Key())
|
||||
appendRValueOrIfaceNext(fmt.SetIsKey(true), r.Key())
|
||||
fmt.buf.WriteByte('=')
|
||||
appendRValueOrIface(fmtVal, r.Value())
|
||||
appendRValueOrIfaceNext(fmt.SetIsKey(false), r.Value())
|
||||
fmt.buf.WriteByte(' ')
|
||||
}
|
||||
|
||||
@ -852,24 +837,25 @@ func appendStructType(fmt format, v reflect.Value) {
|
||||
n := v.NumField()
|
||||
w := 0
|
||||
|
||||
fmt.buf.WriteByte('{')
|
||||
// If verbose, append the type
|
||||
|
||||
// Prepare formatters
|
||||
fmtKey := fmt.IsKey(true)
|
||||
fmtVal := fmt.IsKey(false)
|
||||
fmt.buf.WriteByte('{')
|
||||
|
||||
// Iterate fields
|
||||
for i := 0; i < n; i++ {
|
||||
vfield := v.Field(i)
|
||||
name := t.Field(i).Name
|
||||
|
||||
// Append field name
|
||||
appendString(fmt.SetIsKey(true), name)
|
||||
fmt.buf.WriteByte('=')
|
||||
|
||||
if !vfield.CanInterface() {
|
||||
// This is an unexported field
|
||||
appendRValue(fmtVal, vfield)
|
||||
appendRValue(fmt.SetIsKey(false), vfield)
|
||||
} else {
|
||||
// This is an exported field!
|
||||
appendString(fmtKey, t.Field(i).Name)
|
||||
fmt.buf.WriteByte('=')
|
||||
appendRValueOrIface(fmtVal, vfield)
|
||||
appendRValueOrIfaceNext(fmt.SetIsKey(false), vfield)
|
||||
}
|
||||
|
||||
// Iter written count
|
||||
@ -885,25 +871,6 @@ func appendStructType(fmt format, v reflect.Value) {
|
||||
fmt.buf.WriteByte('}')
|
||||
}
|
||||
|
||||
// appendKey should only be used in the case of directly setting key-value pairs,
|
||||
// not in the case of appendMapType, appendStructType
|
||||
func appendKey(buf *bytes.Buffer, key string) {
|
||||
if len(key) > 0 {
|
||||
if containsSpaceOrTab(key) {
|
||||
// Key containing spaces/tabs, quote this
|
||||
buf.WriteByte('"')
|
||||
buf.WriteString(key)
|
||||
buf.WriteByte('"')
|
||||
} else {
|
||||
// Key is safe to leave unquoted
|
||||
buf.WriteString(key)
|
||||
}
|
||||
|
||||
// Write final '='
|
||||
buf.WriteByte('=')
|
||||
}
|
||||
}
|
||||
|
||||
// containsSpaceOrTab checks if "s" contains space or tabs
|
||||
func containsSpaceOrTab(s string) bool {
|
||||
for _, r := range s {
|
||||
|
15
vendor/codeberg.org/gruf/go-logger/level.go
generated
vendored
15
vendor/codeberg.org/gruf/go-logger/level.go
generated
vendored
@ -5,7 +5,7 @@
|
||||
|
||||
// Available levels of logging.
|
||||
const (
|
||||
unset LEVEL = 255
|
||||
unset LEVEL = ^LEVEL(0)
|
||||
DEBUG LEVEL = 5
|
||||
INFO LEVEL = 10
|
||||
WARN LEVEL = 15
|
||||
@ -16,7 +16,7 @@
|
||||
var unknownLevel = "unknown"
|
||||
|
||||
// Levels defines a mapping of log LEVELs to formatted level strings
|
||||
type Levels map[LEVEL]string
|
||||
type Levels [^LEVEL(0)]string
|
||||
|
||||
// DefaultLevels returns the default set of log levels
|
||||
func DefaultLevels() Levels {
|
||||
@ -29,11 +29,10 @@ func DefaultLevels() Levels {
|
||||
}
|
||||
}
|
||||
|
||||
// LevelString fetches the appropriate level string for the provided level, or "unknown"
|
||||
func (l Levels) LevelString(lvl LEVEL) string {
|
||||
str, ok := l[lvl]
|
||||
if !ok {
|
||||
return unknownLevel
|
||||
// Get fetches the level string for the provided value, or "unknown"
|
||||
func (l Levels) Get(lvl LEVEL) string {
|
||||
if str := l[int(lvl)]; str != "" {
|
||||
return str
|
||||
}
|
||||
return str
|
||||
return unknownLevel
|
||||
}
|
||||
|
70
vendor/codeberg.org/gruf/go-logger/logger.go
generated
vendored
70
vendor/codeberg.org/gruf/go-logger/logger.go
generated
vendored
@ -2,6 +2,7 @@
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"sync"
|
||||
@ -55,7 +56,6 @@ func NewWith(lvl LEVEL, timestamp bool, fmt LogFormat, bufsize int64, out io.Wri
|
||||
Format: fmt,
|
||||
BufSize: bufsize,
|
||||
Output: out,
|
||||
pool: sync.Pool{},
|
||||
}
|
||||
|
||||
// Ensure clock running
|
||||
@ -75,79 +75,113 @@ func NewWith(lvl LEVEL, timestamp bool, fmt LogFormat, bufsize int64, out io.Wri
|
||||
|
||||
// Entry returns a new Entry from the Logger's pool with background context
|
||||
func (l *Logger) Entry() *Entry {
|
||||
return l.pool.Get().(*Entry).WithContext(context.Background())
|
||||
entry, _ := l.pool.Get().(*Entry)
|
||||
entry.ctx = context.Background()
|
||||
return entry
|
||||
}
|
||||
|
||||
// Debug prints the provided arguments with the debug prefix
|
||||
func (l *Logger) Debug(a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(DEBUG).Hooks().Msg(a...)
|
||||
l.Log(DEBUG, a...)
|
||||
}
|
||||
|
||||
// Debugf prints the provided format string and arguments with the debug prefix
|
||||
func (l *Logger) Debugf(s string, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(DEBUG).Hooks().Msgf(s, a...)
|
||||
l.Logf(DEBUG, s, a...)
|
||||
}
|
||||
|
||||
// Info prints the provided arguments with the info prefix
|
||||
func (l *Logger) Info(a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(INFO).Hooks().Msg(a...)
|
||||
l.Log(INFO, a...)
|
||||
}
|
||||
|
||||
// Infof prints the provided format string and arguments with the info prefix
|
||||
func (l *Logger) Infof(s string, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(INFO).Hooks().Msgf(s, a...)
|
||||
l.Logf(INFO, s, a...)
|
||||
}
|
||||
|
||||
// Warn prints the provided arguments with the warn prefix
|
||||
func (l *Logger) Warn(a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(WARN).Hooks().Msg(a...)
|
||||
l.Log(WARN, a...)
|
||||
}
|
||||
|
||||
// Warnf prints the provided format string and arguments with the warn prefix
|
||||
func (l *Logger) Warnf(s string, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(WARN).Hooks().Msgf(s, a...)
|
||||
l.Logf(WARN, s, a...)
|
||||
}
|
||||
|
||||
// Error prints the provided arguments with the error prefix
|
||||
func (l *Logger) Error(a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(ERROR).Hooks().Msg(a...)
|
||||
l.Log(ERROR, a...)
|
||||
}
|
||||
|
||||
// Errorf prints the provided format string and arguments with the error prefix
|
||||
func (l *Logger) Errorf(s string, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Level(ERROR).Hooks().Msgf(s, a...)
|
||||
l.Logf(ERROR, s, a...)
|
||||
}
|
||||
|
||||
// Fatal prints provided arguments with the fatal prefix before exiting the program
|
||||
// with os.Exit(1)
|
||||
func (l *Logger) Fatal(a ...interface{}) {
|
||||
defer os.Exit(1)
|
||||
l.Entry().TimestampIf().Level(FATAL).Hooks().Msg(a...)
|
||||
l.Log(FATAL, a...)
|
||||
}
|
||||
|
||||
// Fatalf prints provided the provided format string and arguments with the fatal prefix
|
||||
// before exiting the program with os.Exit(1)
|
||||
func (l *Logger) Fatalf(s string, a ...interface{}) {
|
||||
defer os.Exit(1)
|
||||
l.Entry().TimestampIf().Level(FATAL).Hooks().Msgf(s, a...)
|
||||
l.Logf(FATAL, s, a...)
|
||||
}
|
||||
|
||||
// Log prints the provided arguments with the supplied log level
|
||||
// Log prints the provided arguments at the supplied log level
|
||||
func (l *Logger) Log(lvl LEVEL, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Hooks().Msg(a...)
|
||||
if lvl >= l.Level {
|
||||
l.Entry().TimestampIf().Level(lvl).Hooks().Msg(a...)
|
||||
}
|
||||
}
|
||||
|
||||
// Logf prints the provided format string and arguments with the supplied log level
|
||||
// Logf prints the provided format string and arguments at the supplied log level
|
||||
func (l *Logger) Logf(lvl LEVEL, s string, a ...interface{}) {
|
||||
l.Entry().TimestampIf().Hooks().Msgf(s, a...)
|
||||
if lvl >= l.Level {
|
||||
l.Entry().TimestampIf().Level(lvl).Hooks().Msgf(s, a...)
|
||||
}
|
||||
}
|
||||
|
||||
// LogFields prints the provided fields formatted as key-value pairs at the supplied log level
|
||||
func (l *Logger) LogFields(lvl LEVEL, fields map[string]interface{}) {
|
||||
if lvl >= l.Level {
|
||||
l.Entry().TimestampIf().Level(lvl).Fields(fields).Hooks().Send()
|
||||
}
|
||||
}
|
||||
|
||||
// LogValues prints the provided values formatted as-so at the supplied log level
|
||||
func (l *Logger) LogValues(lvl LEVEL, a ...interface{}) {
|
||||
if lvl >= l.Level {
|
||||
l.Entry().TimestampIf().Level(lvl).Values(a...).Hooks().Send()
|
||||
}
|
||||
}
|
||||
|
||||
// Print simply prints provided arguments
|
||||
func (l *Logger) Print(a ...interface{}) {
|
||||
l.Entry().Hooks().Msg(a...)
|
||||
e := l.Entry().TimestampIf()
|
||||
fmt.Fprint(e.buf, a...)
|
||||
e.Send()
|
||||
}
|
||||
|
||||
// Printf simply prints provided the provided format string and arguments
|
||||
func (l *Logger) Printf(s string, a ...interface{}) {
|
||||
l.Entry().Hooks().Msgf(s, a...)
|
||||
e := l.Entry().TimestampIf()
|
||||
fmt.Fprintf(e.buf, s, a...)
|
||||
e.Send()
|
||||
}
|
||||
|
||||
// PrintFields prints the provided fields formatted as key-value pairs
|
||||
func (l *Logger) PrintFields(fields map[string]interface{}) {
|
||||
l.Entry().TimestampIf().Fields(fields).Send()
|
||||
}
|
||||
|
||||
// PrintValues prints the provided values formatted as-so
|
||||
func (l *Logger) PrintValues(a ...interface{}) {
|
||||
l.Entry().TimestampIf().Values(a...).Send()
|
||||
}
|
||||
|
66
vendor/github.com/go-xmlfmt/xmlfmt/README.md
generated
vendored
66
vendor/github.com/go-xmlfmt/xmlfmt/README.md
generated
vendored
@ -15,9 +15,19 @@ package main
|
||||
import "github.com/go-xmlfmt/xmlfmt"
|
||||
|
||||
func main() {
|
||||
xml1 := `<root><this><is>a</is><test /><message><org><cn>Some org-or-other</cn><ph>Wouldnt you like to know</ph></org><contact><fn>Pat</fn><ln>Califia</ln></contact></message></this></root>`
|
||||
xmlfmt.NL = "\n"
|
||||
xml1 := `<root><this><is>a</is><test /><message><!-- with comment --><org><cn>Some org-or-other</cn><ph>Wouldnt you like to know</ph></org><contact><fn>Pat</fn><ln>Califia</ln></contact></message></this></root>`
|
||||
x := xmlfmt.FormatXML(xml1, "\t", " ")
|
||||
print(x)
|
||||
|
||||
// If the XML Comments have nested tags in them
|
||||
xml1 = `<book> <author>Fred</author>
|
||||
<!--
|
||||
<price>20</price><currency>USD</currency>
|
||||
-->
|
||||
<isbn>23456</isbn> </book>`
|
||||
x = xmlfmt.FormatXML(xml1, "", " ", true)
|
||||
print(x)
|
||||
}
|
||||
|
||||
```
|
||||
@ -47,10 +57,25 @@ Output:
|
||||
</message>
|
||||
</this>
|
||||
</root>
|
||||
|
||||
|
||||
<book>
|
||||
<author>Fred
|
||||
</author>
|
||||
<!-- <price>20</price><currency>USD</currency> -->
|
||||
<isbn>23456
|
||||
</isbn>
|
||||
</book>
|
||||
```
|
||||
|
||||
There is no XML decoding and encoding involved, only pure regular expression matching and replacing. So it is much faster than going through decoding and encoding procedures. Moreover, the exact XML source string is preserved, instead of being changed by the encoder. This is why this package exists in the first place.
|
||||
|
||||
Note that
|
||||
|
||||
- the XML is mainly used in Windows environments, thus the default line ending is in Windows' `CRLF` format. To change the default line ending, see the above sample code (first line).
|
||||
- the case of XML comments nested within XML comments is ***not*** supported. Please avoid them or use any other tools to correct them before using this package.
|
||||
- don't turn on the `nestedTagsInComments` parameter blindly, as the code has become 10+ times more complicated because of it.
|
||||
|
||||
## Command
|
||||
|
||||
To use it on command line, check out [xmlfmt](https://github.com/AntonioSun/xmlfmt):
|
||||
@ -59,7 +84,8 @@ To use it on command line, check out [xmlfmt](https://github.com/AntonioSun/xmlf
|
||||
```
|
||||
$ xmlfmt
|
||||
XML Formatter
|
||||
built on 2019-12-08
|
||||
Version 1.1.0 built on 2021-12-06
|
||||
Copyright (C) 2021, Antonio Sun
|
||||
|
||||
The xmlfmt will format the XML string without rewriting the document
|
||||
|
||||
@ -69,6 +95,42 @@ Options:
|
||||
-f, --file *The xml file to read from (or stdin)
|
||||
-p, --prefix each element begins on a new line and this prefix
|
||||
-i, --indent[= ] indent string for nested elements
|
||||
-n, --nested nested tags in comments
|
||||
|
||||
$ xmlfmt -f https://pastebin.com/raw/z3euQ5PR
|
||||
|
||||
<root>
|
||||
<this>
|
||||
<is>a
|
||||
</is>
|
||||
<test />
|
||||
<message>
|
||||
<!-- with comment -->
|
||||
<org>
|
||||
<cn>Some org-or-other
|
||||
</cn>
|
||||
<ph>Wouldnt you like to know
|
||||
</ph>
|
||||
</org>
|
||||
<contact>
|
||||
<fn>Pat
|
||||
</fn>
|
||||
<ln>Califia
|
||||
</ln>
|
||||
</contact>
|
||||
</message>
|
||||
</this>
|
||||
</root>
|
||||
|
||||
$ xmlfmt -f https://pastebin.com/raw/Zs0qy0qz -n
|
||||
|
||||
<book>
|
||||
<author>Fred
|
||||
</author>
|
||||
<!-- <price>20</price><currency>USD</currency> -->
|
||||
<isbn>23456
|
||||
</isbn>
|
||||
</book>
|
||||
```
|
||||
|
||||
|
||||
|
31
vendor/github.com/go-xmlfmt/xmlfmt/xmlfmt.go
generated
vendored
31
vendor/github.com/go-xmlfmt/xmlfmt/xmlfmt.go
generated
vendored
@ -1,12 +1,13 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Porgram: xmlfmt.go
|
||||
// Purpose: Go XML Beautify from XML string using pure string manipulation
|
||||
// Authors: Antonio Sun (c) 2016-2019, All rights reserved
|
||||
// Authors: Antonio Sun (c) 2016-2021, All rights reserved
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package xmlfmt
|
||||
|
||||
import (
|
||||
"html"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
@ -17,12 +18,32 @@
|
||||
NL = "\r\n"
|
||||
)
|
||||
|
||||
// FormatXML will (purly) reformat the XML string in a readable way, without any rewriting/altering the structure
|
||||
func FormatXML(xmls, prefix, indent string) string {
|
||||
// FormatXML will (purly) reformat the XML string in a readable way, without any rewriting/altering the structure.
|
||||
// If your XML Comments have nested tags in them, or you're not 100% sure otherwise, pass `true` as the third parameter to this function. But don't turn it on blindly, as the code has become ten times more complicated because of it.
|
||||
func FormatXML(xmls, prefix, indent string, nestedTagsInComments ...bool) string {
|
||||
nestedTagsInComment := false
|
||||
if len(nestedTagsInComments) > 0 {
|
||||
nestedTagsInComment = nestedTagsInComments[0]
|
||||
}
|
||||
reXmlComments := regexp.MustCompile(`(?s)(<!--)(.*?)(-->)`)
|
||||
src := regexp.MustCompile(`(?s)>\s+<`).ReplaceAllString(xmls, "><")
|
||||
|
||||
if nestedTagsInComment {
|
||||
src = reXmlComments.ReplaceAllStringFunc(src, func(m string) string {
|
||||
parts := reXmlComments.FindStringSubmatch(m)
|
||||
p2 := regexp.MustCompile(`\r*\n`).ReplaceAllString(parts[2], " ")
|
||||
return parts[1] + html.EscapeString(p2) + parts[3]
|
||||
})
|
||||
}
|
||||
rf := replaceTag(prefix, indent)
|
||||
return (prefix + reg.ReplaceAllStringFunc(src, rf))
|
||||
r := prefix + reg.ReplaceAllStringFunc(src, rf)
|
||||
if nestedTagsInComment {
|
||||
r = reXmlComments.ReplaceAllStringFunc(r, func(m string) string {
|
||||
parts := reXmlComments.FindStringSubmatch(m)
|
||||
return parts[1] + html.UnescapeString(parts[2]) + parts[3]
|
||||
})
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
// replaceTag returns a closure function to do 's/(?<=>)\s+(?=<)//g; s(<(/?)([^>]+?)(/?)>)($indent+=$3?0:$1?-1:1;"<$1$2$3>"."\n".(" "x$indent))ge' as in Perl
|
||||
|
4
vendor/github.com/jackc/pgtype/CHANGELOG.md
generated
vendored
4
vendor/github.com/jackc/pgtype/CHANGELOG.md
generated
vendored
@ -1,3 +1,7 @@
|
||||
# 1.9.1 (November 28, 2021)
|
||||
|
||||
* Fix: binary timestamp is assumed to be in UTC (restored behavior changed in v1.9.0)
|
||||
|
||||
# 1.9.0 (November 20, 2021)
|
||||
|
||||
* Fix binary hstore null decoding
|
||||
|
2
vendor/github.com/jackc/pgtype/timestamp.go
generated
vendored
2
vendor/github.com/jackc/pgtype/timestamp.go
generated
vendored
@ -144,7 +144,7 @@ func (dst *Timestamp) DecodeBinary(ci *ConnInfo, src []byte) error {
|
||||
tim := time.Unix(
|
||||
microsecFromUnixEpochToY2K/1000000+microsecSinceY2K/1000000,
|
||||
(microsecFromUnixEpochToY2K%1000000*1000)+(microsecSinceY2K%1000000*1000),
|
||||
)
|
||||
).UTC()
|
||||
*dst = Timestamp{Time: tim, Status: Present}
|
||||
}
|
||||
|
||||
|
5
vendor/github.com/jackc/pgx/v4/CHANGELOG.md
generated
vendored
5
vendor/github.com/jackc/pgx/v4/CHANGELOG.md
generated
vendored
@ -1,3 +1,8 @@
|
||||
# 4.14.1 (November 28, 2021)
|
||||
|
||||
* Upgrade pgtype to v1.9.1 (fixes unintentional change to timestamp binary decoding)
|
||||
* Start pgxpool background health check after initial connections
|
||||
|
||||
# 4.14.0 (November 20, 2021)
|
||||
|
||||
* Upgrade pgconn to v1.10.1
|
||||
|
16
vendor/github.com/jackc/pgx/v4/tx.go
generated
vendored
16
vendor/github.com/jackc/pgx/v4/tx.go
generated
vendored
@ -15,10 +15,10 @@
|
||||
|
||||
// Transaction isolation levels
|
||||
const (
|
||||
Serializable = TxIsoLevel("serializable")
|
||||
RepeatableRead = TxIsoLevel("repeatable read")
|
||||
ReadCommitted = TxIsoLevel("read committed")
|
||||
ReadUncommitted = TxIsoLevel("read uncommitted")
|
||||
Serializable TxIsoLevel = "serializable"
|
||||
RepeatableRead TxIsoLevel = "repeatable read"
|
||||
ReadCommitted TxIsoLevel = "read committed"
|
||||
ReadUncommitted TxIsoLevel = "read uncommitted"
|
||||
)
|
||||
|
||||
// TxAccessMode is the transaction access mode (read write or read only)
|
||||
@ -26,8 +26,8 @@
|
||||
|
||||
// Transaction access modes
|
||||
const (
|
||||
ReadWrite = TxAccessMode("read write")
|
||||
ReadOnly = TxAccessMode("read only")
|
||||
ReadWrite TxAccessMode = "read write"
|
||||
ReadOnly TxAccessMode = "read only"
|
||||
)
|
||||
|
||||
// TxDeferrableMode is the transaction deferrable mode (deferrable or not deferrable)
|
||||
@ -35,8 +35,8 @@
|
||||
|
||||
// Transaction deferrable modes
|
||||
const (
|
||||
Deferrable = TxDeferrableMode("deferrable")
|
||||
NotDeferrable = TxDeferrableMode("not deferrable")
|
||||
Deferrable TxDeferrableMode = "deferrable"
|
||||
NotDeferrable TxDeferrableMode = "not deferrable"
|
||||
)
|
||||
|
||||
// TxOptions are transaction modes within a transaction block
|
||||
|
4
vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
generated
vendored
4
vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
generated
vendored
@ -1,3 +1,7 @@
|
||||
## 1.4.3
|
||||
|
||||
* Fix cases where `json.Number` didn't decode properly [GH-261]
|
||||
|
||||
## 1.4.2
|
||||
|
||||
* Custom name matchers to support any sort of casing, formatting, etc. for
|
||||
|
8
vendor/github.com/mitchellh/mapstructure/mapstructure.go
generated
vendored
8
vendor/github.com/mitchellh/mapstructure/mapstructure.go
generated
vendored
@ -684,16 +684,12 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e
|
||||
}
|
||||
case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
|
||||
jn := data.(json.Number)
|
||||
i, err := jn.Int64()
|
||||
i, err := strconv.ParseUint(string(jn), 0, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf(
|
||||
"error decoding json.Number into %s: %s", name, err)
|
||||
}
|
||||
if i < 0 && !d.config.WeaklyTypedInput {
|
||||
return fmt.Errorf("cannot parse '%s', %d overflows uint",
|
||||
name, i)
|
||||
}
|
||||
val.SetUint(uint64(i))
|
||||
val.SetUint(i)
|
||||
default:
|
||||
return fmt.Errorf(
|
||||
"'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
|
||||
|
2
vendor/github.com/spf13/viper/.golangci.yml
generated
vendored
2
vendor/github.com/spf13/viper/.golangci.yml
generated
vendored
@ -20,7 +20,6 @@ linters:
|
||||
- exhaustive
|
||||
- exportloopref
|
||||
- gci
|
||||
- goconst
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
@ -62,6 +61,7 @@ linters:
|
||||
# - gochecknoglobals
|
||||
# - gochecknoinits
|
||||
# - gocognit
|
||||
# - goconst
|
||||
# - gocritic
|
||||
# - gocyclo
|
||||
# - godot
|
||||
|
4
vendor/github.com/spf13/viper/Makefile
generated
vendored
4
vendor/github.com/spf13/viper/Makefile
generated
vendored
@ -15,8 +15,8 @@ TEST_FORMAT = short-verbose
|
||||
endif
|
||||
|
||||
# Dependency versions
|
||||
GOTESTSUM_VERSION = 1.6.4
|
||||
GOLANGCI_VERSION = 1.40.1
|
||||
GOTESTSUM_VERSION = 1.7.0
|
||||
GOLANGCI_VERSION = 1.43.0
|
||||
|
||||
# Add the ability to override some variables
|
||||
# Use with care
|
||||
|
65
vendor/github.com/spf13/viper/fs.go
generated
vendored
Normal file
65
vendor/github.com/spf13/viper/fs.go
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
//go:build go1.16 && finder
|
||||
// +build go1.16,finder
|
||||
|
||||
package viper
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/fs"
|
||||
"path"
|
||||
)
|
||||
|
||||
type finder struct {
|
||||
paths []string
|
||||
fileNames []string
|
||||
extensions []string
|
||||
|
||||
withoutExtension bool
|
||||
}
|
||||
|
||||
func (f finder) Find(fsys fs.FS) (string, error) {
|
||||
for _, searchPath := range f.paths {
|
||||
for _, fileName := range f.fileNames {
|
||||
for _, extension := range f.extensions {
|
||||
filePath := path.Join(searchPath, fileName+"."+extension)
|
||||
|
||||
ok, err := fileExists(fsys, filePath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if ok {
|
||||
return filePath, nil
|
||||
}
|
||||
}
|
||||
|
||||
if f.withoutExtension {
|
||||
filePath := path.Join(searchPath, fileName)
|
||||
|
||||
ok, err := fileExists(fsys, filePath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if ok {
|
||||
return filePath, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func fileExists(fsys fs.FS, filePath string) (bool, error) {
|
||||
fileInfo, err := fs.Stat(fsys, filePath)
|
||||
if err == nil {
|
||||
return !fileInfo.IsDir(), nil
|
||||
}
|
||||
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return false, err
|
||||
}
|
77
vendor/github.com/spf13/viper/logger.go
generated
vendored
Normal file
77
vendor/github.com/spf13/viper/logger.go
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
package viper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
)
|
||||
|
||||
// Logger is a unified interface for various logging use cases and practices, including:
|
||||
// - leveled logging
|
||||
// - structured logging
|
||||
type Logger interface {
|
||||
// Trace logs a Trace event.
|
||||
//
|
||||
// Even more fine-grained information than Debug events.
|
||||
// Loggers not supporting this level should fall back to Debug.
|
||||
Trace(msg string, keyvals ...interface{})
|
||||
|
||||
// Debug logs a Debug event.
|
||||
//
|
||||
// A verbose series of information events.
|
||||
// They are useful when debugging the system.
|
||||
Debug(msg string, keyvals ...interface{})
|
||||
|
||||
// Info logs an Info event.
|
||||
//
|
||||
// General information about what's happening inside the system.
|
||||
Info(msg string, keyvals ...interface{})
|
||||
|
||||
// Warn logs a Warn(ing) event.
|
||||
//
|
||||
// Non-critical events that should be looked at.
|
||||
Warn(msg string, keyvals ...interface{})
|
||||
|
||||
// Error logs an Error event.
|
||||
//
|
||||
// Critical events that require immediate attention.
|
||||
// Loggers commonly provide Fatal and Panic levels above Error level,
|
||||
// but exiting and panicing is out of scope for a logging library.
|
||||
Error(msg string, keyvals ...interface{})
|
||||
}
|
||||
|
||||
type jwwLogger struct{}
|
||||
|
||||
func (jwwLogger) Trace(msg string, keyvals ...interface{}) {
|
||||
jww.TRACE.Printf(jwwLogMessage(msg, keyvals...))
|
||||
}
|
||||
|
||||
func (jwwLogger) Debug(msg string, keyvals ...interface{}) {
|
||||
jww.DEBUG.Printf(jwwLogMessage(msg, keyvals...))
|
||||
}
|
||||
|
||||
func (jwwLogger) Info(msg string, keyvals ...interface{}) {
|
||||
jww.INFO.Printf(jwwLogMessage(msg, keyvals...))
|
||||
}
|
||||
|
||||
func (jwwLogger) Warn(msg string, keyvals ...interface{}) {
|
||||
jww.WARN.Printf(jwwLogMessage(msg, keyvals...))
|
||||
}
|
||||
|
||||
func (jwwLogger) Error(msg string, keyvals ...interface{}) {
|
||||
jww.ERROR.Printf(jwwLogMessage(msg, keyvals...))
|
||||
}
|
||||
|
||||
func jwwLogMessage(msg string, keyvals ...interface{}) string {
|
||||
out := msg
|
||||
|
||||
if len(keyvals) > 0 && len(keyvals)%2 == 1 {
|
||||
keyvals = append(keyvals, nil)
|
||||
}
|
||||
|
||||
for i := 0; i <= len(keyvals)-2; i += 2 {
|
||||
out = fmt.Sprintf("%s %v=%v", out, keyvals[i], keyvals[i+1])
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
22
vendor/github.com/spf13/viper/util.go
generated
vendored
22
vendor/github.com/spf13/viper/util.go
generated
vendored
@ -18,9 +18,7 @@
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cast"
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
)
|
||||
|
||||
// ConfigParseError denotes failing to parse configuration file.
|
||||
@ -88,8 +86,8 @@ func insensitiviseMap(m map[string]interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
func absPathify(inPath string) string {
|
||||
jww.INFO.Println("Trying to resolve absolute path to", inPath)
|
||||
func absPathify(logger Logger, inPath string) string {
|
||||
logger.Info("trying to resolve absolute path", "path", inPath)
|
||||
|
||||
if inPath == "$HOME" || strings.HasPrefix(inPath, "$HOME"+string(os.PathSeparator)) {
|
||||
inPath = userHomeDir() + inPath[5:]
|
||||
@ -106,21 +104,9 @@ func absPathify(inPath string) string {
|
||||
return filepath.Clean(p)
|
||||
}
|
||||
|
||||
jww.ERROR.Println("Couldn't discover absolute path")
|
||||
jww.ERROR.Println(err)
|
||||
return ""
|
||||
}
|
||||
logger.Error(fmt.Errorf("could not discover absolute path: %w", err).Error())
|
||||
|
||||
// Check if file Exists
|
||||
func exists(fs afero.Fs, path string) (bool, error) {
|
||||
stat, err := fs.Stat(path)
|
||||
if err == nil {
|
||||
return !stat.IsDir(), nil
|
||||
}
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
return ""
|
||||
}
|
||||
|
||||
func stringInSlice(a string, list []string) bool {
|
||||
|
97
vendor/github.com/spf13/viper/viper.go
generated
vendored
97
vendor/github.com/spf13/viper/viper.go
generated
vendored
@ -39,7 +39,6 @@
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cast"
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
"github.com/spf13/pflag"
|
||||
"github.com/subosito/gotenv"
|
||||
"gopkg.in/ini.v1"
|
||||
@ -260,6 +259,8 @@ type Viper struct {
|
||||
properties *properties.Properties
|
||||
|
||||
onConfigChange func(fsnotify.Event)
|
||||
|
||||
logger Logger
|
||||
}
|
||||
|
||||
// New returns an initialized Viper instance.
|
||||
@ -267,7 +268,7 @@ func New() *Viper {
|
||||
v := new(Viper)
|
||||
v.keyDelim = "."
|
||||
v.configName = "config"
|
||||
v.configPermissions = os.FileMode(0644)
|
||||
v.configPermissions = os.FileMode(0o644)
|
||||
v.fs = afero.NewOsFs()
|
||||
v.config = make(map[string]interface{})
|
||||
v.override = make(map[string]interface{})
|
||||
@ -277,6 +278,7 @@ func New() *Viper {
|
||||
v.env = make(map[string][]string)
|
||||
v.aliases = make(map[string]string)
|
||||
v.typeByDefValue = false
|
||||
v.logger = jwwLogger{}
|
||||
|
||||
return v
|
||||
}
|
||||
@ -517,8 +519,9 @@ func AddConfigPath(in string) { v.AddConfigPath(in) }
|
||||
|
||||
func (v *Viper) AddConfigPath(in string) {
|
||||
if in != "" {
|
||||
absin := absPathify(in)
|
||||
jww.INFO.Println("adding", absin, "to paths to search")
|
||||
absin := absPathify(v.logger, in)
|
||||
|
||||
v.logger.Info("adding path to search paths", "path", absin)
|
||||
if !stringInSlice(absin, v.configPaths) {
|
||||
v.configPaths = append(v.configPaths, absin)
|
||||
}
|
||||
@ -542,7 +545,8 @@ func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error {
|
||||
return UnsupportedRemoteProviderError(provider)
|
||||
}
|
||||
if provider != "" && endpoint != "" {
|
||||
jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint)
|
||||
v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint)
|
||||
|
||||
rp := &defaultRemoteProvider{
|
||||
endpoint: endpoint,
|
||||
provider: provider,
|
||||
@ -574,7 +578,8 @@ func (v *Viper) AddSecureRemoteProvider(provider, endpoint, path, secretkeyring
|
||||
return UnsupportedRemoteProviderError(provider)
|
||||
}
|
||||
if provider != "" && endpoint != "" {
|
||||
jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint)
|
||||
v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint)
|
||||
|
||||
rp := &defaultRemoteProvider{
|
||||
endpoint: endpoint,
|
||||
provider: provider,
|
||||
@ -1390,14 +1395,15 @@ func (v *Viper) registerAlias(alias string, key string) {
|
||||
v.aliases[alias] = key
|
||||
}
|
||||
} else {
|
||||
jww.WARN.Println("Creating circular reference alias", alias, key, v.realKey(key))
|
||||
v.logger.Warn("creating circular reference alias", "alias", alias, "key", key, "real_key", v.realKey(key))
|
||||
}
|
||||
}
|
||||
|
||||
func (v *Viper) realKey(key string) string {
|
||||
newkey, exists := v.aliases[key]
|
||||
if exists {
|
||||
jww.DEBUG.Println("Alias", key, "to", newkey)
|
||||
v.logger.Debug("key is an alias", "alias", key, "to", newkey)
|
||||
|
||||
return v.realKey(newkey)
|
||||
}
|
||||
return key
|
||||
@ -1458,7 +1464,7 @@ func (v *Viper) Set(key string, value interface{}) {
|
||||
func ReadInConfig() error { return v.ReadInConfig() }
|
||||
|
||||
func (v *Viper) ReadInConfig() error {
|
||||
jww.INFO.Println("Attempting to read in config file")
|
||||
v.logger.Info("attempting to read in config file")
|
||||
filename, err := v.getConfigFile()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -1468,7 +1474,7 @@ func (v *Viper) ReadInConfig() error {
|
||||
return UnsupportedConfigError(v.getConfigType())
|
||||
}
|
||||
|
||||
jww.DEBUG.Println("Reading file: ", filename)
|
||||
v.logger.Debug("reading file", "file", filename)
|
||||
file, err := afero.ReadFile(v.fs, filename)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -1489,7 +1495,7 @@ func (v *Viper) ReadInConfig() error {
|
||||
func MergeInConfig() error { return v.MergeInConfig() }
|
||||
|
||||
func (v *Viper) MergeInConfig() error {
|
||||
jww.INFO.Println("Attempting to merge in config file")
|
||||
v.logger.Info("attempting to merge in config file")
|
||||
filename, err := v.getConfigFile()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -1580,7 +1586,8 @@ func (v *Viper) SafeWriteConfigAs(filename string) error {
|
||||
}
|
||||
|
||||
func (v *Viper) writeConfig(filename string, force bool) error {
|
||||
jww.INFO.Println("Attempting to write configuration to file.")
|
||||
v.logger.Info("attempting to write configuration to file")
|
||||
|
||||
var configType string
|
||||
|
||||
ext := filepath.Ext(filename)
|
||||
@ -1796,7 +1803,7 @@ func mergeMaps(
|
||||
for sk, sv := range src {
|
||||
tk := keyExists(sk, tgt)
|
||||
if tk == "" {
|
||||
jww.TRACE.Printf("tk=\"\", tgt[%s]=%v", sk, sv)
|
||||
v.logger.Trace("", "tk", "\"\"", fmt.Sprintf("tgt[%s]", sk), sv)
|
||||
tgt[sk] = sv
|
||||
if itgt != nil {
|
||||
itgt[sk] = sv
|
||||
@ -1806,7 +1813,7 @@ func mergeMaps(
|
||||
|
||||
tv, ok := tgt[tk]
|
||||
if !ok {
|
||||
jww.TRACE.Printf("tgt[%s] != ok, tgt[%s]=%v", tk, sk, sv)
|
||||
v.logger.Trace("", fmt.Sprintf("ok[%s]", tk), false, fmt.Sprintf("tgt[%s]", sk), sv)
|
||||
tgt[sk] = sv
|
||||
if itgt != nil {
|
||||
itgt[sk] = sv
|
||||
@ -1817,27 +1824,38 @@ func mergeMaps(
|
||||
svType := reflect.TypeOf(sv)
|
||||
tvType := reflect.TypeOf(tv)
|
||||
if tvType != nil && svType != tvType { // Allow for the target to be nil
|
||||
jww.ERROR.Printf(
|
||||
"svType != tvType; key=%s, st=%v, tt=%v, sv=%v, tv=%v",
|
||||
sk, svType, tvType, sv, tv)
|
||||
v.logger.Error(
|
||||
"svType != tvType",
|
||||
"key", sk,
|
||||
"st", svType,
|
||||
"tt", tvType,
|
||||
"sv", sv,
|
||||
"tv", tv,
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
||||
jww.TRACE.Printf("processing key=%s, st=%v, tt=%v, sv=%v, tv=%v",
|
||||
sk, svType, tvType, sv, tv)
|
||||
v.logger.Trace(
|
||||
"processing",
|
||||
"key", sk,
|
||||
"st", svType,
|
||||
"tt", tvType,
|
||||
"sv", sv,
|
||||
"tv", tv,
|
||||
)
|
||||
|
||||
switch ttv := tv.(type) {
|
||||
case map[interface{}]interface{}:
|
||||
jww.TRACE.Printf("merging maps (must convert)")
|
||||
v.logger.Trace("merging maps (must convert)")
|
||||
tsv := sv.(map[interface{}]interface{})
|
||||
ssv := castToMapStringInterface(tsv)
|
||||
stv := castToMapStringInterface(ttv)
|
||||
mergeMaps(ssv, stv, ttv)
|
||||
case map[string]interface{}:
|
||||
jww.TRACE.Printf("merging maps")
|
||||
v.logger.Trace("merging maps")
|
||||
mergeMaps(sv.(map[string]interface{}), ttv, nil)
|
||||
default:
|
||||
jww.TRACE.Printf("setting value")
|
||||
v.logger.Trace("setting value")
|
||||
tgt[tk] = sv
|
||||
if itgt != nil {
|
||||
itgt[tk] = sv
|
||||
@ -1872,7 +1890,7 @@ func (v *Viper) getKeyValueConfig() error {
|
||||
for _, rp := range v.remoteProviders {
|
||||
val, err := v.getRemoteConfig(rp)
|
||||
if err != nil {
|
||||
jww.ERROR.Printf("get remote config: %s", err)
|
||||
v.logger.Error(fmt.Errorf("get remote config: %w", err).Error())
|
||||
|
||||
continue
|
||||
}
|
||||
@ -2108,39 +2126,6 @@ func (v *Viper) getConfigFile() (string, error) {
|
||||
return v.configFile, nil
|
||||
}
|
||||
|
||||
func (v *Viper) searchInPath(in string) (filename string) {
|
||||
jww.DEBUG.Println("Searching for config in ", in)
|
||||
for _, ext := range SupportedExts {
|
||||
jww.DEBUG.Println("Checking for", filepath.Join(in, v.configName+"."+ext))
|
||||
if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+ext)); b {
|
||||
jww.DEBUG.Println("Found: ", filepath.Join(in, v.configName+"."+ext))
|
||||
return filepath.Join(in, v.configName+"."+ext)
|
||||
}
|
||||
}
|
||||
|
||||
if v.configType != "" {
|
||||
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b {
|
||||
return filepath.Join(in, v.configName)
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
// Search all configPaths for any config file.
|
||||
// Returns the first path that exists (and is a config file).
|
||||
func (v *Viper) findConfigFile() (string, error) {
|
||||
jww.INFO.Println("Searching for config in ", v.configPaths)
|
||||
|
||||
for _, cp := range v.configPaths {
|
||||
file := v.searchInPath(cp)
|
||||
if file != "" {
|
||||
return file, nil
|
||||
}
|
||||
}
|
||||
return "", ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)}
|
||||
}
|
||||
|
||||
// Debug prints all configuration registries for debugging
|
||||
// purposes.
|
||||
func Debug() { v.Debug() }
|
||||
|
57
vendor/github.com/spf13/viper/viper_go1_15.go
generated
vendored
Normal file
57
vendor/github.com/spf13/viper/viper_go1_15.go
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
//go:build !go1.16 || !finder
|
||||
// +build !go1.16 !finder
|
||||
|
||||
package viper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
// Search all configPaths for any config file.
|
||||
// Returns the first path that exists (and is a config file).
|
||||
func (v *Viper) findConfigFile() (string, error) {
|
||||
v.logger.Info("searching for config in paths", "paths", v.configPaths)
|
||||
|
||||
for _, cp := range v.configPaths {
|
||||
file := v.searchInPath(cp)
|
||||
if file != "" {
|
||||
return file, nil
|
||||
}
|
||||
}
|
||||
return "", ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)}
|
||||
}
|
||||
|
||||
func (v *Viper) searchInPath(in string) (filename string) {
|
||||
v.logger.Debug("searching for config in path", "path", in)
|
||||
for _, ext := range SupportedExts {
|
||||
v.logger.Debug("checking if file exists", "file", filepath.Join(in, v.configName+"."+ext))
|
||||
if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+ext)); b {
|
||||
v.logger.Debug("found file", "file", filepath.Join(in, v.configName+"."+ext))
|
||||
return filepath.Join(in, v.configName+"."+ext)
|
||||
}
|
||||
}
|
||||
|
||||
if v.configType != "" {
|
||||
if b, _ := exists(v.fs, filepath.Join(in, v.configName)); b {
|
||||
return filepath.Join(in, v.configName)
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
// Check if file Exists
|
||||
func exists(fs afero.Fs, path string) (bool, error) {
|
||||
stat, err := fs.Stat(path)
|
||||
if err == nil {
|
||||
return !stat.IsDir(), nil
|
||||
}
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
32
vendor/github.com/spf13/viper/viper_go1_16.go
generated
vendored
Normal file
32
vendor/github.com/spf13/viper/viper_go1_16.go
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
//go:build go1.16 && finder
|
||||
// +build go1.16,finder
|
||||
|
||||
package viper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
// Search all configPaths for any config file.
|
||||
// Returns the first path that exists (and is a config file).
|
||||
func (v *Viper) findConfigFile() (string, error) {
|
||||
finder := finder{
|
||||
paths: v.configPaths,
|
||||
fileNames: []string{v.configName},
|
||||
extensions: SupportedExts,
|
||||
withoutExtension: v.configType != "",
|
||||
}
|
||||
|
||||
file, err := finder.Find(afero.NewIOFS(v.fs))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if file == "" {
|
||||
return "", ConfigFileNotFoundError{v.configName, fmt.Sprintf("%s", v.configPaths)}
|
||||
}
|
||||
|
||||
return file, nil
|
||||
}
|
1
vendor/github.com/spf13/viper/watch.go
generated
vendored
1
vendor/github.com/spf13/viper/watch.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !js
|
||||
// +build !js
|
||||
|
||||
package viper
|
||||
|
2
vendor/github.com/tdewolff/parse/v2/html/util.go
generated
vendored
2
vendor/github.com/tdewolff/parse/v2/html/util.go
generated
vendored
@ -5,7 +5,7 @@
|
||||
doubleQuoteEntityBytes = []byte(""")
|
||||
)
|
||||
|
||||
// EscapeAttrVal returns the escaped attribute value bytes without quotes.
|
||||
// EscapeAttrVal returns the escaped attribute value bytes with quotes. Either single or double quotes are used, whichever is shorter. If there are no quotes present in the value and the value is in HTML (not XML), it will return the value without quotes.
|
||||
func EscapeAttrVal(buf *[]byte, orig, b []byte, isXML bool) []byte {
|
||||
singles := 0
|
||||
doubles := 0
|
||||
|
9
vendor/github.com/uptrace/bun/CHANGELOG.md
generated
vendored
9
vendor/github.com/uptrace/bun/CHANGELOG.md
generated
vendored
@ -1,3 +1,12 @@
|
||||
## [1.0.19](https://github.com/uptrace/bun/compare/v1.0.18...v1.0.19) (2021-11-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for column:name to specify column name ([e37b460](https://github.com/uptrace/bun/commit/e37b4602823babc8221970e086cfed90c6ad4cf4))
|
||||
|
||||
|
||||
|
||||
## [1.0.18](https://github.com/uptrace/bun/compare/v1.0.17...v1.0.18) (2021-11-24)
|
||||
|
||||
|
||||
|
149
vendor/github.com/uptrace/bun/README.md
generated
vendored
149
vendor/github.com/uptrace/bun/README.md
generated
vendored
@ -29,10 +29,10 @@ Main features are:
|
||||
|
||||
Resources:
|
||||
|
||||
- [Discussions](https://github.com/uptrace/bun/discussions).
|
||||
- [Newsletter](https://blog.uptrace.dev/pages/newsletter.html) to get latest updates.
|
||||
- [**Get started**](https://bun.uptrace.dev/guide/getting-started.html)
|
||||
- [Examples](https://github.com/uptrace/bun/tree/master/example)
|
||||
- [Documentation](https://bun.uptrace.dev/)
|
||||
- [Discussions](https://github.com/uptrace/bun/discussions)
|
||||
- [Newsletter](https://blog.uptrace.dev/pages/newsletter.html) to get latest updates.
|
||||
- [Reference](https://pkg.go.dev/github.com/uptrace/bun)
|
||||
- [Starter kit](https://github.com/go-bun/bun-starter-kit)
|
||||
|
||||
@ -156,147 +156,8 @@ go get github.com/uptrace/bun
|
||||
You also need to install a database/sql driver and the corresponding Bun
|
||||
[dialect](https://bun.uptrace.dev/guide/drivers.html).
|
||||
|
||||
## Quickstart
|
||||
|
||||
First you need to create a `sql.DB`. Here we are using the
|
||||
[sqliteshim](https://pkg.go.dev/github.com/uptrace/bun/driver/sqliteshim) driver which chooses
|
||||
between [modernc.org/sqlite](https://modernc.org/sqlite/) and
|
||||
[mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) depending on your platform.
|
||||
|
||||
```go
|
||||
import "github.com/uptrace/bun/driver/sqliteshim"
|
||||
|
||||
sqldb, err := sql.Open(sqliteshim.ShimName, "file::memory:?cache=shared")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
And then create a `bun.DB` on top of it using the corresponding SQLite
|
||||
[dialect](https://bun.uptrace.dev/guide/drivers.html) that comes with Bun:
|
||||
|
||||
```go
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
"github.com/uptrace/bun/dialect/sqlitedialect"
|
||||
)
|
||||
|
||||
db := bun.NewDB(sqldb, sqlitedialect.New())
|
||||
```
|
||||
|
||||
Now you are ready to issue some queries:
|
||||
|
||||
```go
|
||||
type User struct {
|
||||
ID int64
|
||||
Name string
|
||||
}
|
||||
|
||||
user := new(User)
|
||||
err := db.NewSelect().
|
||||
Model(user).
|
||||
Where("name != ?", "").
|
||||
OrderExpr("id ASC").
|
||||
Limit(1).
|
||||
Scan(ctx)
|
||||
```
|
||||
|
||||
## Basic example
|
||||
|
||||
To provide initial data for our [example](/example/basic/), we will use Bun
|
||||
[fixtures](https://bun.uptrace.dev/guide/fixtures.html):
|
||||
|
||||
```go
|
||||
import "github.com/uptrace/bun/dbfixture"
|
||||
|
||||
// Register models for the fixture.
|
||||
db.RegisterModel((*User)(nil), (*Story)(nil))
|
||||
|
||||
// WithRecreateTables tells Bun to drop existing tables and create new ones.
|
||||
fixture := dbfixture.New(db, dbfixture.WithRecreateTables())
|
||||
|
||||
// Load fixture.yml which contains data for User and Story models.
|
||||
if err := fixture.Load(ctx, os.DirFS("."), "fixture.yml"); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
The `fixture.yml` looks like this:
|
||||
|
||||
```yaml
|
||||
- model: User
|
||||
rows:
|
||||
- _id: admin
|
||||
name: admin
|
||||
emails: ['admin1@admin', 'admin2@admin']
|
||||
- _id: root
|
||||
name: root
|
||||
emails: ['root1@root', 'root2@root']
|
||||
|
||||
- model: Story
|
||||
rows:
|
||||
- title: Cool story
|
||||
author_id: '{{ $.User.admin.ID }}'
|
||||
```
|
||||
|
||||
To select all users:
|
||||
|
||||
```go
|
||||
users := make([]User, 0)
|
||||
if err := db.NewSelect().Model(&users).OrderExpr("id ASC").Scan(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
To select a single user by id:
|
||||
|
||||
```go
|
||||
user1 := new(User)
|
||||
if err := db.NewSelect().Model(user1).Where("id = ?", 1).Scan(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
To select a story and the associated author in a single query:
|
||||
|
||||
```go
|
||||
story := new(Story)
|
||||
if err := db.NewSelect().
|
||||
Model(story).
|
||||
Relation("Author").
|
||||
Limit(1).
|
||||
Scan(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
To select a user into a map:
|
||||
|
||||
```go
|
||||
m := make(map[string]interface{})
|
||||
if err := db.NewSelect().
|
||||
Model((*User)(nil)).
|
||||
Limit(1).
|
||||
Scan(ctx, &m); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
To select all users scanning each column into a separate slice:
|
||||
|
||||
```go
|
||||
var ids []int64
|
||||
var names []string
|
||||
if err := db.NewSelect().
|
||||
ColumnExpr("id, name").
|
||||
Model((*User)(nil)).
|
||||
OrderExpr("id ASC").
|
||||
Scan(ctx, &ids, &names); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
For more details, please consult [docs](https://bun.uptrace.dev/) and check [examples](example).
|
||||
See [**Getting started**](https://bun.uptrace.dev/guide/getting-started.html) guide and check
|
||||
[examples](example).
|
||||
|
||||
## Contributors
|
||||
|
||||
|
9
vendor/github.com/uptrace/bun/db.go
generated
vendored
9
vendor/github.com/uptrace/bun/db.go
generated
vendored
@ -203,6 +203,15 @@ func (db *DB) Formatter() schema.Formatter {
|
||||
return db.fmter
|
||||
}
|
||||
|
||||
// UpdateFQN returns a fully qualified column name. For MySQL, it returns the column name with
|
||||
// the table alias. For other RDBMS, it returns just the column name.
|
||||
func (db *DB) UpdateFQN(alias, column string) Ident {
|
||||
if db.HasFeature(feature.UpdateMultiTable) {
|
||||
return Ident(alias + "." + column)
|
||||
}
|
||||
return Ident(column)
|
||||
}
|
||||
|
||||
// HasFeature uses feature package to report whether the underlying DBMS supports this feature.
|
||||
func (db *DB) HasFeature(feat feature.Feature) bool {
|
||||
return db.fmter.HasFeature(feat)
|
||||
|
2
vendor/github.com/uptrace/bun/package.json
generated
vendored
2
vendor/github.com/uptrace/bun/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bun",
|
||||
"version": "1.0.18",
|
||||
"version": "1.0.19",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:uptrace/bun.git",
|
||||
"author": "Vladimir Mihailenco <vladimir.webdev@gmail.com>",
|
||||
|
11
vendor/github.com/uptrace/bun/query_update.go
generated
vendored
11
vendor/github.com/uptrace/bun/query_update.go
generated
vendored
@ -452,9 +452,12 @@ func (q *UpdateQuery) afterUpdateHook(ctx context.Context) error {
|
||||
|
||||
// FQN returns a fully qualified column name. For MySQL, it returns the column name with
|
||||
// the table alias. For other RDBMS, it returns just the column name.
|
||||
func (q *UpdateQuery) FQN(name string) Ident {
|
||||
if q.db.fmter.HasFeature(feature.UpdateMultiTable) {
|
||||
return Ident(q.table.Alias + "." + name)
|
||||
func (q *UpdateQuery) FQN(column string) Ident {
|
||||
if q.table == nil {
|
||||
panic("UpdateQuery.FQN requires a model")
|
||||
}
|
||||
return Ident(name)
|
||||
if q.db.HasFeature(feature.UpdateMultiTable) {
|
||||
return Ident(q.table.Alias + "." + column)
|
||||
}
|
||||
return Ident(column)
|
||||
}
|
||||
|
23
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
23
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
@ -285,8 +285,8 @@ func (t *Table) processBaseModelField(f reflect.StructField) {
|
||||
|
||||
if isKnownTableOption(tag.Name) {
|
||||
internal.Warn.Printf(
|
||||
"%s.%s tag name %q is also an option name; is it a mistake?",
|
||||
t.TypeName, f.Name, tag.Name,
|
||||
"%s.%s tag name %q is also an option name, is it a mistake? Try table:%s.",
|
||||
t.TypeName, f.Name, tag.Name, tag.Name,
|
||||
)
|
||||
}
|
||||
|
||||
@ -300,6 +300,10 @@ func (t *Table) processBaseModelField(f reflect.StructField) {
|
||||
t.setName(tag.Name)
|
||||
}
|
||||
|
||||
if s, ok := tag.Option("table"); ok {
|
||||
t.setName(s)
|
||||
}
|
||||
|
||||
if s, ok := tag.Option("select"); ok {
|
||||
t.SQLNameForSelects = t.quoteTableName(s)
|
||||
}
|
||||
@ -312,19 +316,23 @@ func (t *Table) processBaseModelField(f reflect.StructField) {
|
||||
|
||||
//nolint
|
||||
func (t *Table) newField(f reflect.StructField, index []int) *Field {
|
||||
sqlName := internal.Underscore(f.Name)
|
||||
tag := tagparser.Parse(f.Tag.Get("bun"))
|
||||
|
||||
sqlName := internal.Underscore(f.Name)
|
||||
if tag.Name != "" && tag.Name != sqlName {
|
||||
if isKnownFieldOption(tag.Name) {
|
||||
internal.Warn.Printf(
|
||||
"%s.%s tag name %q is also an option name; is it a mistake?",
|
||||
t.TypeName, f.Name, tag.Name,
|
||||
"%s.%s tag name %q is also an option name, is it a mistake? Try column:%s.",
|
||||
t.TypeName, f.Name, tag.Name, tag.Name,
|
||||
)
|
||||
}
|
||||
sqlName = tag.Name
|
||||
}
|
||||
|
||||
if s, ok := tag.Option("column"); ok {
|
||||
sqlName = s
|
||||
}
|
||||
|
||||
for name := range tag.Options {
|
||||
if !isKnownFieldOption(name) {
|
||||
internal.Warn.Printf("%s.%s has unknown tag option: %q", t.TypeName, f.Name, name)
|
||||
@ -854,7 +862,7 @@ func appendNew(dst []int, src ...int) []int {
|
||||
|
||||
func isKnownTableOption(name string) bool {
|
||||
switch name {
|
||||
case "alias", "select":
|
||||
case "table", "alias", "select":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@ -862,7 +870,8 @@ func isKnownTableOption(name string) bool {
|
||||
|
||||
func isKnownFieldOption(name string) bool {
|
||||
switch name {
|
||||
case "alias",
|
||||
case "column",
|
||||
"alias",
|
||||
"type",
|
||||
"array",
|
||||
"hstore",
|
||||
|
2
vendor/github.com/uptrace/bun/version.go
generated
vendored
2
vendor/github.com/uptrace/bun/version.go
generated
vendored
@ -2,5 +2,5 @@
|
||||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.0.18"
|
||||
return "1.0.19"
|
||||
}
|
||||
|
8
vendor/golang.org/x/crypto/ssh/cipher.go
generated
vendored
8
vendor/golang.org/x/crypto/ssh/cipher.go
generated
vendored
@ -394,6 +394,10 @@ func (c *gcmCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error)
|
||||
}
|
||||
c.incIV()
|
||||
|
||||
if len(plain) == 0 {
|
||||
return nil, errors.New("ssh: empty packet")
|
||||
}
|
||||
|
||||
padding := plain[0]
|
||||
if padding < 4 {
|
||||
// padding is a byte, so it automatically satisfies
|
||||
@ -710,6 +714,10 @@ func (c *chacha20Poly1305Cipher) readCipherPacket(seqNum uint32, r io.Reader) ([
|
||||
plain := c.buf[4:contentEnd]
|
||||
s.XORKeyStream(plain, plain)
|
||||
|
||||
if len(plain) == 0 {
|
||||
return nil, errors.New("ssh: empty packet")
|
||||
}
|
||||
|
||||
padding := plain[0]
|
||||
if padding < 4 {
|
||||
// padding is a byte, so it automatically satisfies
|
||||
|
4
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
generated
vendored
4
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
generated
vendored
@ -15,7 +15,3 @@ func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
|
||||
// xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
|
||||
// and in cpu_gccgo.c for gccgo.
|
||||
func xgetbv() (eax, edx uint32)
|
||||
|
||||
// darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler
|
||||
// and in cpu_gccgo_x86.go for gccgo.
|
||||
func darwinSupportsAVX512() bool
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -519,8 +519,10 @@ func Pipe(p []int) (err error) {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -159,8 +159,10 @@ func Pipe(p []int) (err error) {
|
||||
}
|
||||
var x [2]int32
|
||||
err = pipe(&x)
|
||||
p[0] = int(x[0])
|
||||
p[1] = int(x[1])
|
||||
if err == nil {
|
||||
p[0] = int(x[0])
|
||||
p[1] = int(x[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
10
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
10
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
p[0], p[1], err = pipe()
|
||||
r, w, err := pipe()
|
||||
if err == nil {
|
||||
p[0], p[1] = r, w
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -114,7 +117,10 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
var pp [2]_C_int
|
||||
// pipe2 on dragonfly takes an fds array as an argument, but still
|
||||
// returns the file descriptors.
|
||||
p[0], p[1], err = pipe2(&pp, flags)
|
||||
r, w, err := pipe2(&pp, flags)
|
||||
if err == nil {
|
||||
p[0], p[1] = r, w
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
@ -110,8 +110,10 @@ func Pipe2(p []int, flags int) error {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -131,8 +131,10 @@ func Pipe2(p []int, flags int) error {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
14
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
14
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
p[0], p[1], err = pipe()
|
||||
return
|
||||
return Pipe2(p, 0)
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@ -87,8 +87,10 @@ func Pipe2(p []int, flags int) error {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
12
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
12
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -66,8 +66,10 @@ func Pipe(p []int) (err error) {
|
||||
if n != 0 {
|
||||
return err
|
||||
}
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -79,8 +81,10 @@ func Pipe2(p []int, flags int) error {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
@ -579,8 +579,10 @@ func Pipe(p []int) (err error) {
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
if err == nil {
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
generated
vendored
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
generated
vendored
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
generated
vendored
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
generated
vendored
@ -351,18 +351,6 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
fd2 = int(r1)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
|
2
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
2
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -323,6 +323,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
|
||||
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
|
||||
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
|
||||
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
|
||||
//sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW
|
||||
//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW
|
||||
//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW
|
||||
//sys Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error)
|
||||
|
17
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
17
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@ -156,6 +156,8 @@
|
||||
MAX_PATH = 260
|
||||
MAX_LONG_PATH = 32768
|
||||
|
||||
MAX_MODULE_NAME32 = 255
|
||||
|
||||
MAX_COMPUTERNAME_LENGTH = 15
|
||||
|
||||
TIME_ZONE_ID_UNKNOWN = 0
|
||||
@ -970,6 +972,21 @@ type ThreadEntry32 struct {
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type ModuleEntry32 struct {
|
||||
Size uint32
|
||||
ModuleID uint32
|
||||
ProcessID uint32
|
||||
GlblcntUsage uint32
|
||||
ProccntUsage uint32
|
||||
ModBaseAddr uintptr
|
||||
ModBaseSize uint32
|
||||
ModuleHandle Handle
|
||||
Module [MAX_MODULE_NAME32 + 1]uint16
|
||||
ExePath [MAX_PATH]uint16
|
||||
}
|
||||
|
||||
const SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{})
|
||||
|
||||
type Systemtime struct {
|
||||
Year uint16
|
||||
Month uint16
|
||||
|
18
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
18
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@ -295,6 +295,8 @@ func errnoErr(e syscall.Errno) error {
|
||||
procLockFileEx = modkernel32.NewProc("LockFileEx")
|
||||
procLockResource = modkernel32.NewProc("LockResource")
|
||||
procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
|
||||
procModule32FirstW = modkernel32.NewProc("Module32FirstW")
|
||||
procModule32NextW = modkernel32.NewProc("Module32NextW")
|
||||
procMoveFileExW = modkernel32.NewProc("MoveFileExW")
|
||||
procMoveFileW = modkernel32.NewProc("MoveFileW")
|
||||
procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
|
||||
@ -2567,6 +2569,22 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui
|
||||
return
|
||||
}
|
||||
|
||||
func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
|
||||
if r1 == 0 {
|
||||
|
23
vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
generated
vendored
23
vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
generated
vendored
@ -50,11 +50,24 @@ func Find(importPath, srcDir string) (filename, path string) {
|
||||
// additional trailing data beyond the end of the export data.
|
||||
func NewReader(r io.Reader) (io.Reader, error) {
|
||||
buf := bufio.NewReader(r)
|
||||
_, err := gcimporter.FindExportData(buf)
|
||||
// If we ever switch to a zip-like archive format with the ToC
|
||||
// at the end, we can return the correct portion of export data,
|
||||
// but for now we must return the entire rest of the file.
|
||||
return buf, err
|
||||
_, size, err := gcimporter.FindExportData(buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if size >= 0 {
|
||||
// We were given an archive and found the __.PKGDEF in it.
|
||||
// This tells us the size of the export data, and we don't
|
||||
// need to return the entire file.
|
||||
return &io.LimitedReader{
|
||||
R: buf,
|
||||
N: size,
|
||||
}, nil
|
||||
} else {
|
||||
// We were given an object file. As such, we don't know how large
|
||||
// the export data is and must return the entire file.
|
||||
return buf, nil
|
||||
}
|
||||
}
|
||||
|
||||
// Read reads export data from in, decodes it, and returns type
|
||||
|
3
vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go
generated
vendored
3
vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go
generated
vendored
@ -34,9 +34,6 @@
|
||||
// (suspected) format errors, and whenever a change is made to the format.
|
||||
const debugFormat = false // default: false
|
||||
|
||||
// If trace is set, debugging output is printed to std out.
|
||||
const trace = false // default: false
|
||||
|
||||
// Current export format version. Increase with each format change.
|
||||
// Note: The latest binary (non-indexed) export format is at version 6.
|
||||
// This exporter is still at level 4, but it doesn't matter since
|
||||
|
51
vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go
generated
vendored
51
vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go
generated
vendored
@ -74,9 +74,10 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []
|
||||
pathList: []string{""}, // empty string is mapped to 0
|
||||
fake: fakeFileSet{
|
||||
fset: fset,
|
||||
files: make(map[string]*token.File),
|
||||
files: make(map[string]*fileInfo),
|
||||
},
|
||||
}
|
||||
defer p.fake.setLines() // set lines for files in fset
|
||||
|
||||
// read version info
|
||||
var versionstr string
|
||||
@ -338,37 +339,49 @@ func (p *importer) pos() token.Pos {
|
||||
// Synthesize a token.Pos
|
||||
type fakeFileSet struct {
|
||||
fset *token.FileSet
|
||||
files map[string]*token.File
|
||||
files map[string]*fileInfo
|
||||
}
|
||||
|
||||
type fileInfo struct {
|
||||
file *token.File
|
||||
lastline int
|
||||
}
|
||||
|
||||
const maxlines = 64 * 1024
|
||||
|
||||
func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
|
||||
// TODO(mdempsky): Make use of column.
|
||||
|
||||
// Since we don't know the set of needed file positions, we
|
||||
// reserve maxlines positions per file.
|
||||
const maxlines = 64 * 1024
|
||||
// Since we don't know the set of needed file positions, we reserve maxlines
|
||||
// positions per file. We delay calling token.File.SetLines until all
|
||||
// positions have been calculated (by way of fakeFileSet.setLines), so that
|
||||
// we can avoid setting unnecessary lines. See also golang/go#46586.
|
||||
f := s.files[file]
|
||||
if f == nil {
|
||||
f = s.fset.AddFile(file, -1, maxlines)
|
||||
f = &fileInfo{file: s.fset.AddFile(file, -1, maxlines)}
|
||||
s.files[file] = f
|
||||
// Allocate the fake linebreak indices on first use.
|
||||
// TODO(adonovan): opt: save ~512KB using a more complex scheme?
|
||||
fakeLinesOnce.Do(func() {
|
||||
fakeLines = make([]int, maxlines)
|
||||
for i := range fakeLines {
|
||||
fakeLines[i] = i
|
||||
}
|
||||
})
|
||||
f.SetLines(fakeLines)
|
||||
}
|
||||
|
||||
if line > maxlines {
|
||||
line = 1
|
||||
}
|
||||
if line > f.lastline {
|
||||
f.lastline = line
|
||||
}
|
||||
|
||||
// Treat the file as if it contained only newlines
|
||||
// and column=1: use the line number as the offset.
|
||||
return f.Pos(line - 1)
|
||||
// Return a fake position assuming that f.file consists only of newlines.
|
||||
return token.Pos(f.file.Base() + line - 1)
|
||||
}
|
||||
|
||||
func (s *fakeFileSet) setLines() {
|
||||
fakeLinesOnce.Do(func() {
|
||||
fakeLines = make([]int, maxlines)
|
||||
for i := range fakeLines {
|
||||
fakeLines[i] = i
|
||||
}
|
||||
})
|
||||
for _, f := range s.files {
|
||||
f.file.SetLines(fakeLines[:f.lastline])
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
|
16
vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go
generated
vendored
16
vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go
generated
vendored
@ -16,7 +16,7 @@
|
||||
"strings"
|
||||
)
|
||||
|
||||
func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
|
||||
func readGopackHeader(r *bufio.Reader) (name string, size int64, err error) {
|
||||
// See $GOROOT/include/ar.h.
|
||||
hdr := make([]byte, 16+12+6+6+8+10+2)
|
||||
_, err = io.ReadFull(r, hdr)
|
||||
@ -28,7 +28,8 @@ func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
|
||||
fmt.Printf("header: %s", hdr)
|
||||
}
|
||||
s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10]))
|
||||
size, err = strconv.Atoi(s)
|
||||
length, err := strconv.Atoi(s)
|
||||
size = int64(length)
|
||||
if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' {
|
||||
err = fmt.Errorf("invalid archive header")
|
||||
return
|
||||
@ -42,8 +43,8 @@ func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
|
||||
// file by reading from it. The reader must be positioned at the
|
||||
// start of the file before calling this function. The hdr result
|
||||
// is the string before the export data, either "$$" or "$$B".
|
||||
//
|
||||
func FindExportData(r *bufio.Reader) (hdr string, err error) {
|
||||
// The size result is the length of the export data in bytes, or -1 if not known.
|
||||
func FindExportData(r *bufio.Reader) (hdr string, size int64, err error) {
|
||||
// Read first line to make sure this is an object file.
|
||||
line, err := r.ReadSlice('\n')
|
||||
if err != nil {
|
||||
@ -54,7 +55,7 @@ func FindExportData(r *bufio.Reader) (hdr string, err error) {
|
||||
if string(line) == "!<arch>\n" {
|
||||
// Archive file. Scan to __.PKGDEF.
|
||||
var name string
|
||||
if name, _, err = readGopackHeader(r); err != nil {
|
||||
if name, size, err = readGopackHeader(r); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@ -70,6 +71,7 @@ func FindExportData(r *bufio.Reader) (hdr string, err error) {
|
||||
err = fmt.Errorf("can't find export data (%v)", err)
|
||||
return
|
||||
}
|
||||
size -= int64(len(line))
|
||||
}
|
||||
|
||||
// Now at __.PKGDEF in archive or still at beginning of file.
|
||||
@ -86,8 +88,12 @@ func FindExportData(r *bufio.Reader) (hdr string, err error) {
|
||||
err = fmt.Errorf("can't find export data (%v)", err)
|
||||
return
|
||||
}
|
||||
size -= int64(len(line))
|
||||
}
|
||||
hdr = string(line)
|
||||
if size < 0 {
|
||||
size = -1
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
12
vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go
generated
vendored
12
vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go
generated
vendored
@ -29,8 +29,14 @@
|
||||
"text/scanner"
|
||||
)
|
||||
|
||||
// debugging/development support
|
||||
const debug = false
|
||||
const (
|
||||
// Enable debug during development: it adds some additional checks, and
|
||||
// prevents errors from being recovered.
|
||||
debug = false
|
||||
|
||||
// If trace is set, debugging output is printed to std out.
|
||||
trace = false
|
||||
)
|
||||
|
||||
var pkgExts = [...]string{".a", ".o"}
|
||||
|
||||
@ -179,7 +185,7 @@ func Import(packages map[string]*types.Package, path, srcDir string, lookup func
|
||||
|
||||
var hdr string
|
||||
buf := bufio.NewReader(rc)
|
||||
if hdr, err = FindExportData(buf); err != nil {
|
||||
if hdr, _, err = FindExportData(buf); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
122
vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go
generated
vendored
122
vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go
generated
vendored
@ -11,6 +11,7 @@
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/constant"
|
||||
"go/token"
|
||||
@ -19,6 +20,7 @@
|
||||
"math/big"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/tools/internal/typeparams"
|
||||
)
|
||||
@ -33,15 +35,15 @@
|
||||
// The package path of the top-level package will not be recorded,
|
||||
// so that calls to IImportData can override with a provided package path.
|
||||
func IExportData(out io.Writer, fset *token.FileSet, pkg *types.Package) error {
|
||||
return iexportCommon(out, fset, false, []*types.Package{pkg})
|
||||
return iexportCommon(out, fset, false, iexportVersion, []*types.Package{pkg})
|
||||
}
|
||||
|
||||
// IExportBundle writes an indexed export bundle for pkgs to out.
|
||||
func IExportBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error {
|
||||
return iexportCommon(out, fset, true, pkgs)
|
||||
return iexportCommon(out, fset, true, iexportVersion, pkgs)
|
||||
}
|
||||
|
||||
func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, pkgs []*types.Package) (err error) {
|
||||
func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, version int, pkgs []*types.Package) (err error) {
|
||||
if !debug {
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
@ -57,9 +59,11 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, pkgs []*type
|
||||
|
||||
p := iexporter{
|
||||
fset: fset,
|
||||
version: version,
|
||||
allPkgs: map[*types.Package]bool{},
|
||||
stringIndex: map[string]uint64{},
|
||||
declIndex: map[types.Object]uint64{},
|
||||
tparamNames: map[types.Object]string{},
|
||||
typIndex: map[types.Type]uint64{},
|
||||
}
|
||||
if !bundle {
|
||||
@ -119,7 +123,7 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, pkgs []*type
|
||||
if bundle {
|
||||
hdr.uint64(bundleVersion)
|
||||
}
|
||||
hdr.uint64(iexportVersion)
|
||||
hdr.uint64(uint64(p.version))
|
||||
hdr.uint64(uint64(p.strings.Len()))
|
||||
hdr.uint64(dataLen)
|
||||
|
||||
@ -136,8 +140,12 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle bool, pkgs []*type
|
||||
// non-compiler tools and includes a complete package description
|
||||
// (i.e., name and height).
|
||||
func (w *exportWriter) writeIndex(index map[types.Object]uint64) {
|
||||
type pkgObj struct {
|
||||
obj types.Object
|
||||
name string // qualified name; differs from obj.Name for type params
|
||||
}
|
||||
// Build a map from packages to objects from that package.
|
||||
pkgObjs := map[*types.Package][]types.Object{}
|
||||
pkgObjs := map[*types.Package][]pkgObj{}
|
||||
|
||||
// For the main index, make sure to include every package that
|
||||
// we reference, even if we're not exporting (or reexporting)
|
||||
@ -150,7 +158,8 @@ func (w *exportWriter) writeIndex(index map[types.Object]uint64) {
|
||||
}
|
||||
|
||||
for obj := range index {
|
||||
pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj)
|
||||
name := w.p.indexName(obj)
|
||||
pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], pkgObj{obj, name})
|
||||
}
|
||||
|
||||
var pkgs []*types.Package
|
||||
@ -158,7 +167,7 @@ func (w *exportWriter) writeIndex(index map[types.Object]uint64) {
|
||||
pkgs = append(pkgs, pkg)
|
||||
|
||||
sort.Slice(objs, func(i, j int) bool {
|
||||
return indexName(objs[i]) < indexName(objs[j])
|
||||
return objs[i].name < objs[j].name
|
||||
})
|
||||
}
|
||||
|
||||
@ -175,29 +184,26 @@ func (w *exportWriter) writeIndex(index map[types.Object]uint64) {
|
||||
objs := pkgObjs[pkg]
|
||||
w.uint64(uint64(len(objs)))
|
||||
for _, obj := range objs {
|
||||
w.string(indexName(obj))
|
||||
w.uint64(index[obj])
|
||||
w.string(obj.name)
|
||||
w.uint64(index[obj.obj])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// indexName returns the 'indexed' name of an object. It differs from
|
||||
// obj.Name() only for type parameter names, where we include the subscripted
|
||||
// type parameter ID.
|
||||
//
|
||||
// TODO(rfindley): remove this once we no longer need subscripts.
|
||||
func indexName(obj types.Object) (res string) {
|
||||
if _, ok := obj.(*types.TypeName); ok {
|
||||
if tparam, ok := obj.Type().(*typeparams.TypeParam); ok {
|
||||
return types.TypeString(tparam, func(*types.Package) string { return "" })
|
||||
}
|
||||
// obj.Name() only for type parameter names, where the name is qualified by
|
||||
// owner.
|
||||
func (p *iexporter) indexName(obj types.Object) (res string) {
|
||||
if name := p.tparamNames[obj]; name != "" {
|
||||
return name
|
||||
}
|
||||
return obj.Name()
|
||||
}
|
||||
|
||||
type iexporter struct {
|
||||
fset *token.FileSet
|
||||
out *bytes.Buffer
|
||||
fset *token.FileSet
|
||||
out *bytes.Buffer
|
||||
version int
|
||||
|
||||
localpkg *types.Package
|
||||
|
||||
@ -211,9 +217,21 @@ type iexporter struct {
|
||||
strings intWriter
|
||||
stringIndex map[string]uint64
|
||||
|
||||
data0 intWriter
|
||||
declIndex map[types.Object]uint64
|
||||
typIndex map[types.Type]uint64
|
||||
data0 intWriter
|
||||
declIndex map[types.Object]uint64
|
||||
tparamNames map[types.Object]string // typeparam->qualified name
|
||||
typIndex map[types.Type]uint64
|
||||
|
||||
indent int // for tracing support
|
||||
}
|
||||
|
||||
func (p *iexporter) trace(format string, args ...interface{}) {
|
||||
if !trace {
|
||||
// Call sites should also be guarded, but having this check here allows
|
||||
// easily enabling/disabling debug trace statements.
|
||||
return
|
||||
}
|
||||
fmt.Printf(strings.Repeat("..", p.indent)+format+"\n", args...)
|
||||
}
|
||||
|
||||
// stringOff returns the offset of s within the string section.
|
||||
@ -239,7 +257,7 @@ func (p *iexporter) pushDecl(obj types.Object) {
|
||||
return
|
||||
}
|
||||
|
||||
p.declIndex[obj] = ^uint64(0) // mark n present in work queue
|
||||
p.declIndex[obj] = ^uint64(0) // mark obj present in work queue
|
||||
p.declTodo.pushTail(obj)
|
||||
}
|
||||
|
||||
@ -262,6 +280,14 @@ func (w *exportWriter) exportPath(pkg *types.Package) string {
|
||||
}
|
||||
|
||||
func (p *iexporter) doDecl(obj types.Object) {
|
||||
if trace {
|
||||
p.trace("exporting decl %v (%T)", obj, obj)
|
||||
p.indent++
|
||||
defer func() {
|
||||
p.indent--
|
||||
p.trace("=> %s", obj)
|
||||
}()
|
||||
}
|
||||
w := p.newWriter()
|
||||
w.setPkg(obj.Pkg(), false)
|
||||
|
||||
@ -291,7 +317,7 @@ func (p *iexporter) doDecl(obj types.Object) {
|
||||
// other places in the signature and function that they
|
||||
// are used.
|
||||
if tparams := typeparams.ForSignature(sig); tparams.Len() > 0 {
|
||||
w.tparamList(tparams, obj.Pkg())
|
||||
w.tparamList(obj, tparams, obj.Pkg())
|
||||
}
|
||||
w.signature(sig)
|
||||
|
||||
@ -306,7 +332,15 @@ func (p *iexporter) doDecl(obj types.Object) {
|
||||
if tparam, ok := t.(*typeparams.TypeParam); ok {
|
||||
w.tag('P')
|
||||
w.pos(obj.Pos())
|
||||
w.typ(tparam.Constraint(), obj.Pkg())
|
||||
constraint := tparam.Constraint()
|
||||
if p.version >= iexportVersionGo1_18 {
|
||||
implicit := false
|
||||
if iface, _ := constraint.(*types.Interface); iface != nil {
|
||||
implicit = typeparams.IsImplicit(iface)
|
||||
}
|
||||
w.bool(implicit)
|
||||
}
|
||||
w.typ(constraint, obj.Pkg())
|
||||
break
|
||||
}
|
||||
|
||||
@ -331,7 +365,7 @@ func (p *iexporter) doDecl(obj types.Object) {
|
||||
w.pos(obj.Pos())
|
||||
|
||||
if typeparams.ForNamed(named).Len() > 0 {
|
||||
w.tparamList(typeparams.ForNamed(named), obj.Pkg())
|
||||
w.tparamList(obj, typeparams.ForNamed(named), obj.Pkg())
|
||||
}
|
||||
|
||||
underlying := obj.Type().Underlying()
|
||||
@ -348,6 +382,15 @@ func (p *iexporter) doDecl(obj types.Object) {
|
||||
w.pos(m.Pos())
|
||||
w.string(m.Name())
|
||||
sig, _ := m.Type().(*types.Signature)
|
||||
|
||||
// Receiver type parameters are type arguments of the receiver type, so
|
||||
// their name must be qualified before exporting recv.
|
||||
rparams := typeparams.RecvTypeParams(sig)
|
||||
for i := 0; i < rparams.Len(); i++ {
|
||||
rparam := rparams.At(i)
|
||||
name := obj.Name() + "." + m.Name() + "." + rparam.Obj().Name()
|
||||
w.p.tparamNames[rparam.Obj()] = name
|
||||
}
|
||||
w.param(sig.Recv())
|
||||
w.signature(sig)
|
||||
}
|
||||
@ -364,7 +407,7 @@ func (w *exportWriter) tag(tag byte) {
|
||||
}
|
||||
|
||||
func (w *exportWriter) pos(pos token.Pos) {
|
||||
if iexportVersion >= iexportVersionPosCol {
|
||||
if w.p.version >= iexportVersionPosCol {
|
||||
w.posV1(pos)
|
||||
} else {
|
||||
w.posV0(pos)
|
||||
@ -447,9 +490,11 @@ func (w *exportWriter) pkg(pkg *types.Package) {
|
||||
}
|
||||
|
||||
func (w *exportWriter) qualifiedIdent(obj types.Object) {
|
||||
name := w.p.indexName(obj)
|
||||
|
||||
// Ensure any referenced declarations are written out too.
|
||||
w.p.pushDecl(obj)
|
||||
w.string(indexName(obj))
|
||||
w.string(name)
|
||||
w.pkg(obj.Pkg())
|
||||
}
|
||||
|
||||
@ -483,6 +528,14 @@ func (w *exportWriter) startType(k itag) {
|
||||
}
|
||||
|
||||
func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
|
||||
if trace {
|
||||
w.p.trace("exporting type %s (%T)", t, t)
|
||||
w.p.indent++
|
||||
defer func() {
|
||||
w.p.indent--
|
||||
w.p.trace("=> %s", t)
|
||||
}()
|
||||
}
|
||||
switch t := t.(type) {
|
||||
case *types.Named:
|
||||
if targs := typeparams.NamedTypeArgs(t); targs.Len() > 0 {
|
||||
@ -619,10 +672,14 @@ func (w *exportWriter) typeList(ts *typeparams.TypeList, pkg *types.Package) {
|
||||
}
|
||||
}
|
||||
|
||||
func (w *exportWriter) tparamList(list *typeparams.TypeParamList, pkg *types.Package) {
|
||||
func (w *exportWriter) tparamList(owner types.Object, list *typeparams.TypeParamList, pkg *types.Package) {
|
||||
ll := uint64(list.Len())
|
||||
w.uint64(ll)
|
||||
for i := 0; i < list.Len(); i++ {
|
||||
tparam := list.At(i)
|
||||
// Qualify the type parameter name before exporting its type.
|
||||
name := owner.Name() + "." + tparam.Obj().Name()
|
||||
w.p.tparamNames[tparam.Obj()] = name
|
||||
w.typ(list.At(i), pkg)
|
||||
}
|
||||
}
|
||||
@ -643,6 +700,9 @@ func (w *exportWriter) param(obj types.Object) {
|
||||
|
||||
func (w *exportWriter) value(typ types.Type, v constant.Value) {
|
||||
w.typ(typ, nil)
|
||||
if w.p.version >= iexportVersionGo1_18 {
|
||||
w.int64(int64(v.Kind()))
|
||||
}
|
||||
|
||||
switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType {
|
||||
case types.IsBoolean:
|
||||
@ -832,7 +892,7 @@ func (w *exportWriter) localIdent(obj types.Object) {
|
||||
return
|
||||
}
|
||||
|
||||
name := indexName(obj)
|
||||
name := obj.Name()
|
||||
if name == "_" {
|
||||
w.string("_")
|
||||
return
|
||||
|
172
vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
generated
vendored
172
vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
generated
vendored
@ -18,6 +18,7 @@
|
||||
"go/types"
|
||||
"io"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/tools/internal/typeparams"
|
||||
)
|
||||
@ -44,13 +45,20 @@ func (r *intReader) uint64() uint64 {
|
||||
}
|
||||
|
||||
// Keep this in sync with constants in iexport.go.
|
||||
//
|
||||
// Temporarily, the x/tools importer accepts generic code at both version 1 and
|
||||
// 2. However, version 2 contains some breaking changes on top of version 1:
|
||||
// - the 'implicit' bit is added to exported constraints
|
||||
// - a 'kind' byte is added to constant values (not yet done)
|
||||
//
|
||||
// Once we've completed the bump to version 2 in the standard library, we'll
|
||||
// remove support for generics here at version 1.
|
||||
const (
|
||||
iexportVersionGo1_11 = 0
|
||||
iexportVersionPosCol = 1
|
||||
iexportVersionGo1_18 = 2
|
||||
// TODO: before release, change this back to 2.
|
||||
iexportVersionGenerics = iexportVersionPosCol
|
||||
|
||||
iexportVersionCurrent = iexportVersionGenerics
|
||||
)
|
||||
|
||||
type ident struct {
|
||||
@ -123,9 +131,9 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
|
||||
|
||||
version = int64(r.uint64())
|
||||
switch version {
|
||||
case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
|
||||
case iexportVersionGo1_18, iexportVersionPosCol, iexportVersionGo1_11:
|
||||
default:
|
||||
if version > iexportVersionGenerics {
|
||||
if version > iexportVersionGo1_18 {
|
||||
errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
|
||||
} else {
|
||||
errorf("unknown iexport format version %d", version)
|
||||
@ -141,9 +149,8 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
|
||||
r.Seek(sLen+dLen, io.SeekCurrent)
|
||||
|
||||
p := iimporter{
|
||||
exportVersion: version,
|
||||
ipath: path,
|
||||
version: int(version),
|
||||
version: int(version),
|
||||
ipath: path,
|
||||
|
||||
stringData: stringData,
|
||||
stringCache: make(map[uint64]string),
|
||||
@ -153,14 +160,15 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
|
||||
pkgIndex: make(map[*types.Package]map[string]uint64),
|
||||
typCache: make(map[uint64]types.Type),
|
||||
// Separate map for typeparams, keyed by their package and unique
|
||||
// name (name with subscript).
|
||||
// name.
|
||||
tparamIndex: make(map[ident]types.Type),
|
||||
|
||||
fake: fakeFileSet{
|
||||
fset: fset,
|
||||
files: make(map[string]*token.File),
|
||||
files: make(map[string]*fileInfo),
|
||||
},
|
||||
}
|
||||
defer p.fake.setLines() // set lines for files in fset
|
||||
|
||||
for i, pt := range predeclared() {
|
||||
p.typCache[uint64(i)] = pt
|
||||
@ -246,9 +254,8 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
|
||||
}
|
||||
|
||||
type iimporter struct {
|
||||
exportVersion int64
|
||||
ipath string
|
||||
version int
|
||||
version int
|
||||
ipath string
|
||||
|
||||
stringData []byte
|
||||
stringCache map[uint64]string
|
||||
@ -261,9 +268,28 @@ type iimporter struct {
|
||||
|
||||
fake fakeFileSet
|
||||
interfaceList []*types.Interface
|
||||
|
||||
indent int // for tracing support
|
||||
}
|
||||
|
||||
func (p *iimporter) trace(format string, args ...interface{}) {
|
||||
if !trace {
|
||||
// Call sites should also be guarded, but having this check here allows
|
||||
// easily enabling/disabling debug trace statements.
|
||||
return
|
||||
}
|
||||
fmt.Printf(strings.Repeat("..", p.indent)+format+"\n", args...)
|
||||
}
|
||||
|
||||
func (p *iimporter) doDecl(pkg *types.Package, name string) {
|
||||
if debug {
|
||||
p.trace("import decl %s", name)
|
||||
p.indent++
|
||||
defer func() {
|
||||
p.indent--
|
||||
p.trace("=> %s", name)
|
||||
}()
|
||||
}
|
||||
// See if we've already imported this declaration.
|
||||
if obj := pkg.Scope().Lookup(name); obj != nil {
|
||||
return
|
||||
@ -305,7 +331,7 @@ func (p *iimporter) pkgAt(off uint64) *types.Package {
|
||||
}
|
||||
|
||||
func (p *iimporter) typAt(off uint64, base *types.Named) types.Type {
|
||||
if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) {
|
||||
if t, ok := p.typCache[off]; ok && canReuse(base, t) {
|
||||
return t
|
||||
}
|
||||
|
||||
@ -317,12 +343,30 @@ func (p *iimporter) typAt(off uint64, base *types.Named) types.Type {
|
||||
r.declReader.Reset(p.declData[off-predeclReserved:])
|
||||
t := r.doType(base)
|
||||
|
||||
if base == nil || !isInterface(t) {
|
||||
if canReuse(base, t) {
|
||||
p.typCache[off] = t
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
// canReuse reports whether the type rhs on the RHS of the declaration for def
|
||||
// may be re-used.
|
||||
//
|
||||
// Specifically, if def is non-nil and rhs is an interface type with methods, it
|
||||
// may not be re-used because we have a convention of setting the receiver type
|
||||
// for interface methods to def.
|
||||
func canReuse(def *types.Named, rhs types.Type) bool {
|
||||
if def == nil {
|
||||
return true
|
||||
}
|
||||
iface, _ := rhs.(*types.Interface)
|
||||
if iface == nil {
|
||||
return true
|
||||
}
|
||||
// Don't use iface.Empty() here as iface may not be complete.
|
||||
return iface.NumEmbeddeds() == 0 && iface.NumExplicitMethods() == 0
|
||||
}
|
||||
|
||||
type importReader struct {
|
||||
p *iimporter
|
||||
declReader bytes.Reader
|
||||
@ -352,8 +396,7 @@ func (r *importReader) obj(name string) {
|
||||
if tag == 'G' {
|
||||
tparams = r.tparamList()
|
||||
}
|
||||
sig := r.signature(nil)
|
||||
typeparams.SetForSignature(sig, tparams)
|
||||
sig := r.signature(nil, nil, tparams)
|
||||
r.declare(types.NewFunc(pos, r.currPkg, name, sig))
|
||||
|
||||
case 'T', 'U':
|
||||
@ -377,23 +420,21 @@ func (r *importReader) obj(name string) {
|
||||
mpos := r.pos()
|
||||
mname := r.ident()
|
||||
recv := r.param()
|
||||
msig := r.signature(recv)
|
||||
|
||||
// If the receiver has any targs, set those as the
|
||||
// rparams of the method (since those are the
|
||||
// typeparams being used in the method sig/body).
|
||||
targs := typeparams.NamedTypeArgs(baseType(msig.Recv().Type()))
|
||||
base := baseType(recv.Type())
|
||||
assert(base != nil)
|
||||
targs := typeparams.NamedTypeArgs(base)
|
||||
var rparams []*typeparams.TypeParam
|
||||
if targs.Len() > 0 {
|
||||
rparams := make([]*typeparams.TypeParam, targs.Len())
|
||||
rparams = make([]*typeparams.TypeParam, targs.Len())
|
||||
for i := range rparams {
|
||||
// TODO(rfindley): this is less tolerant than the standard library
|
||||
// go/internal/gcimporter, which calls under(...) and is tolerant
|
||||
// of nil rparams. Bring them in sync by making the standard
|
||||
// library importer stricter.
|
||||
rparams[i] = targs.At(i).(*typeparams.TypeParam)
|
||||
}
|
||||
typeparams.SetRecvTypeParams(msig, rparams)
|
||||
}
|
||||
msig := r.signature(recv, rparams, nil)
|
||||
|
||||
named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig))
|
||||
}
|
||||
@ -403,25 +444,35 @@ func (r *importReader) obj(name string) {
|
||||
// We need to "declare" a typeparam in order to have a name that
|
||||
// can be referenced recursively (if needed) in the type param's
|
||||
// bound.
|
||||
if r.p.exportVersion < iexportVersionGenerics {
|
||||
if r.p.version < iexportVersionGenerics {
|
||||
errorf("unexpected type param type")
|
||||
}
|
||||
name0, sub := parseSubscript(name)
|
||||
// Remove the "path" from the type param name that makes it unique
|
||||
ix := strings.LastIndex(name, ".")
|
||||
if ix < 0 {
|
||||
errorf("missing path for type param")
|
||||
}
|
||||
name0 := name[ix+1:]
|
||||
tn := types.NewTypeName(pos, r.currPkg, name0, nil)
|
||||
t := typeparams.NewTypeParam(tn, nil)
|
||||
if sub == 0 {
|
||||
errorf("name %q missing subscript", name)
|
||||
}
|
||||
|
||||
// TODO(rfindley): can we use a different, stable ID?
|
||||
// t.SetId(sub)
|
||||
|
||||
// To handle recursive references to the typeparam within its
|
||||
// bound, save the partial type in tparamIndex before reading the bounds.
|
||||
id := ident{r.currPkg.Name(), name}
|
||||
r.p.tparamIndex[id] = t
|
||||
|
||||
typeparams.SetTypeParamConstraint(t, r.typ())
|
||||
var implicit bool
|
||||
if r.p.version >= iexportVersionGo1_18 {
|
||||
implicit = r.bool()
|
||||
}
|
||||
constraint := r.typ()
|
||||
if implicit {
|
||||
iface, _ := constraint.(*types.Interface)
|
||||
if iface == nil {
|
||||
errorf("non-interface constraint marked implicit")
|
||||
}
|
||||
typeparams.MarkImplicit(iface)
|
||||
}
|
||||
typeparams.SetTypeParamConstraint(t, constraint)
|
||||
|
||||
case 'V':
|
||||
typ := r.typ()
|
||||
@ -439,6 +490,10 @@ func (r *importReader) declare(obj types.Object) {
|
||||
|
||||
func (r *importReader) value() (typ types.Type, val constant.Value) {
|
||||
typ = r.typ()
|
||||
if r.p.version >= iexportVersionGo1_18 {
|
||||
// TODO: add support for using the kind.
|
||||
_ = constant.Kind(r.int64())
|
||||
}
|
||||
|
||||
switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType {
|
||||
case types.IsBoolean:
|
||||
@ -581,7 +636,7 @@ func (r *importReader) qualifiedIdent() (*types.Package, string) {
|
||||
}
|
||||
|
||||
func (r *importReader) pos() token.Pos {
|
||||
if r.p.exportVersion >= iexportVersionPosCol {
|
||||
if r.p.version >= iexportVersionPosCol {
|
||||
r.posv1()
|
||||
} else {
|
||||
r.posv0()
|
||||
@ -629,8 +684,17 @@ func isInterface(t types.Type) bool {
|
||||
func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) }
|
||||
func (r *importReader) string() string { return r.p.stringAt(r.uint64()) }
|
||||
|
||||
func (r *importReader) doType(base *types.Named) types.Type {
|
||||
switch k := r.kind(); k {
|
||||
func (r *importReader) doType(base *types.Named) (res types.Type) {
|
||||
k := r.kind()
|
||||
if debug {
|
||||
r.p.trace("importing type %d (base: %s)", k, base)
|
||||
r.p.indent++
|
||||
defer func() {
|
||||
r.p.indent--
|
||||
r.p.trace("=> %s", res)
|
||||
}()
|
||||
}
|
||||
switch k {
|
||||
default:
|
||||
errorf("unexpected kind tag in %q: %v", r.p.ipath, k)
|
||||
return nil
|
||||
@ -653,7 +717,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
||||
return types.NewMap(r.typ(), r.typ())
|
||||
case signatureType:
|
||||
r.currPkg = r.pkg()
|
||||
return r.signature(nil)
|
||||
return r.signature(nil, nil, nil)
|
||||
|
||||
case structType:
|
||||
r.currPkg = r.pkg()
|
||||
@ -693,7 +757,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
||||
recv = types.NewVar(token.NoPos, r.currPkg, "", base)
|
||||
}
|
||||
|
||||
msig := r.signature(recv)
|
||||
msig := r.signature(recv, nil, nil)
|
||||
methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig)
|
||||
}
|
||||
|
||||
@ -702,7 +766,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
||||
return typ
|
||||
|
||||
case typeParamType:
|
||||
if r.p.exportVersion < iexportVersionGenerics {
|
||||
if r.p.version < iexportVersionGenerics {
|
||||
errorf("unexpected type param type")
|
||||
}
|
||||
pkg, name := r.qualifiedIdent()
|
||||
@ -716,7 +780,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
||||
return r.p.tparamIndex[id]
|
||||
|
||||
case instanceType:
|
||||
if r.p.exportVersion < iexportVersionGenerics {
|
||||
if r.p.version < iexportVersionGenerics {
|
||||
errorf("unexpected instantiation type")
|
||||
}
|
||||
// pos does not matter for instances: they are positioned on the original
|
||||
@ -735,7 +799,7 @@ func (r *importReader) doType(base *types.Named) types.Type {
|
||||
return t
|
||||
|
||||
case unionType:
|
||||
if r.p.exportVersion < iexportVersionGenerics {
|
||||
if r.p.version < iexportVersionGenerics {
|
||||
errorf("unexpected instantiation type")
|
||||
}
|
||||
terms := make([]*typeparams.Term, r.uint64())
|
||||
@ -750,11 +814,11 @@ func (r *importReader) kind() itag {
|
||||
return itag(r.uint64())
|
||||
}
|
||||
|
||||
func (r *importReader) signature(recv *types.Var) *types.Signature {
|
||||
func (r *importReader) signature(recv *types.Var, rparams []*typeparams.TypeParam, tparams []*typeparams.TypeParam) *types.Signature {
|
||||
params := r.paramList()
|
||||
results := r.paramList()
|
||||
variadic := params.Len() > 0 && r.bool()
|
||||
return types.NewSignature(recv, params, results, variadic)
|
||||
return typeparams.NewSignatureType(recv, rparams, tparams, params, results, variadic)
|
||||
}
|
||||
|
||||
func (r *importReader) tparamList() []*typeparams.TypeParam {
|
||||
@ -823,23 +887,3 @@ func baseType(typ types.Type) *types.Named {
|
||||
n, _ := typ.(*types.Named)
|
||||
return n
|
||||
}
|
||||
|
||||
func parseSubscript(name string) (string, uint64) {
|
||||
// Extract the subscript value from the type param name. We export
|
||||
// and import the subscript value, so that all type params have
|
||||
// unique names.
|
||||
sub := uint64(0)
|
||||
startsub := -1
|
||||
for i, r := range name {
|
||||
if '₀' <= r && r < '₀'+10 {
|
||||
if startsub == -1 {
|
||||
startsub = i
|
||||
}
|
||||
sub = sub*10 + uint64(r-'₀')
|
||||
}
|
||||
}
|
||||
if startsub >= 0 {
|
||||
name = name[:startsub]
|
||||
}
|
||||
return name, sub
|
||||
}
|
||||
|
4
vendor/golang.org/x/tools/go/internal/gcimporter/support_go117.go
generated
vendored
4
vendor/golang.org/x/tools/go/internal/gcimporter/support_go117.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !typeparams || !go1.18
|
||||
// +build !typeparams !go1.18
|
||||
//go:build !go1.18
|
||||
// +build !go1.18
|
||||
|
||||
package gcimporter
|
||||
|
||||
|
7
vendor/golang.org/x/tools/go/internal/gcimporter/support_go118.go
generated
vendored
7
vendor/golang.org/x/tools/go/internal/gcimporter/support_go118.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build typeparams && go1.18
|
||||
// +build typeparams,go1.18
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package gcimporter
|
||||
|
||||
@ -16,5 +16,8 @@ func additionalPredeclared() []types.Type {
|
||||
return []types.Type{
|
||||
// comparable
|
||||
types.Universe.Lookup("comparable").Type(),
|
||||
|
||||
// any
|
||||
types.Universe.Lookup("any").Type(),
|
||||
}
|
||||
}
|
||||
|
2
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
2
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
@ -26,6 +26,7 @@
|
||||
"golang.org/x/tools/go/gcexportdata"
|
||||
"golang.org/x/tools/internal/gocommand"
|
||||
"golang.org/x/tools/internal/packagesinternal"
|
||||
"golang.org/x/tools/internal/typeparams"
|
||||
"golang.org/x/tools/internal/typesinternal"
|
||||
)
|
||||
|
||||
@ -910,6 +911,7 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
|
||||
Scopes: make(map[ast.Node]*types.Scope),
|
||||
Selections: make(map[*ast.SelectorExpr]*types.Selection),
|
||||
}
|
||||
typeparams.InitInstanceInfo(lpkg.TypesInfo)
|
||||
lpkg.TypesSizes = ld.sizes
|
||||
|
||||
importer := importerFunc(func(path string) (*types.Package, error) {
|
||||
|
7
vendor/golang.org/x/tools/internal/typeparams/common.go
generated
vendored
7
vendor/golang.org/x/tools/internal/typeparams/common.go
generated
vendored
@ -13,6 +13,7 @@
|
||||
import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"go/types"
|
||||
)
|
||||
|
||||
// A IndexExprData holds data from both ast.IndexExpr and the new
|
||||
@ -23,3 +24,9 @@ type IndexExprData struct {
|
||||
Indices []ast.Expr // index expressions
|
||||
Rbrack token.Pos // position of "]"
|
||||
}
|
||||
|
||||
// IsTypeParam reports whether t is a type parameter.
|
||||
func IsTypeParam(t types.Type) bool {
|
||||
_, ok := t.(*TypeParam)
|
||||
return ok
|
||||
}
|
||||
|
4
vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go
generated
vendored
4
vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !typeparams || !go1.18
|
||||
// +build !typeparams !go1.18
|
||||
//go:build !go1.18
|
||||
// +build !go1.18
|
||||
|
||||
package typeparams
|
||||
|
||||
|
4
vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go
generated
vendored
4
vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go
generated
vendored
@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build typeparams && go1.18
|
||||
// +build typeparams,go1.18
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package typeparams
|
||||
|
||||
|
216
vendor/golang.org/x/tools/internal/typeparams/normalize.go
generated
vendored
Normal file
216
vendor/golang.org/x/tools/internal/typeparams/normalize.go
generated
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package typeparams
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"go/types"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:generate go run copytermlist.go
|
||||
|
||||
const debug = false
|
||||
|
||||
var ErrEmptyTypeSet = errors.New("empty type set")
|
||||
|
||||
// StructuralTerms returns a slice of terms representing the normalized
|
||||
// structural type restrictions of a type parameter, if any.
|
||||
//
|
||||
// Structural type restrictions of a type parameter are created via
|
||||
// non-interface types embedded in its constraint interface (directly, or via a
|
||||
// chain of interface embeddings). For example, in the declaration
|
||||
// type T[P interface{~int; m()}] int
|
||||
// the structural restriction of the type parameter P is ~int.
|
||||
//
|
||||
// With interface embedding and unions, the specification of structural type
|
||||
// restrictions may be arbitrarily complex. For example, consider the
|
||||
// following:
|
||||
//
|
||||
// type A interface{ ~string|~[]byte }
|
||||
//
|
||||
// type B interface{ int|string }
|
||||
//
|
||||
// type C interface { ~string|~int }
|
||||
//
|
||||
// type T[P interface{ A|B; C }] int
|
||||
//
|
||||
// In this example, the structural type restriction of P is ~string|int: A|B
|
||||
// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
|
||||
// which when intersected with C (~string|~int) yields ~string|int.
|
||||
//
|
||||
// StructuralTerms computes these expansions and reductions, producing a
|
||||
// "normalized" form of the embeddings. A structural restriction is normalized
|
||||
// if it is a single union containing no interface terms, and is minimal in the
|
||||
// sense that removing any term changes the set of types satisfying the
|
||||
// constraint. It is left as a proof for the reader that, modulo sorting, there
|
||||
// is exactly one such normalized form.
|
||||
//
|
||||
// Because the minimal representation always takes this form, StructuralTerms
|
||||
// returns a slice of tilde terms corresponding to the terms of the union in
|
||||
// the normalized structural restriction. An error is returned if the
|
||||
// constraint interface is invalid, exceeds complexity bounds, or has an empty
|
||||
// type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet.
|
||||
//
|
||||
// StructuralTerms makes no guarantees about the order of terms, except that it
|
||||
// is deterministic.
|
||||
func StructuralTerms(tparam *TypeParam) ([]*Term, error) {
|
||||
constraint := tparam.Constraint()
|
||||
if constraint == nil {
|
||||
return nil, fmt.Errorf("%s has nil constraint", tparam)
|
||||
}
|
||||
iface, _ := constraint.Underlying().(*types.Interface)
|
||||
if iface == nil {
|
||||
return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying())
|
||||
}
|
||||
return InterfaceTermSet(iface)
|
||||
}
|
||||
|
||||
// InterfaceTermSet computes the normalized terms for a constraint interface,
|
||||
// returning an error if the term set cannot be computed or is empty. In the
|
||||
// latter case, the error will be ErrEmptyTypeSet.
|
||||
//
|
||||
// See the documentation of StructuralTerms for more information on
|
||||
// normalization.
|
||||
func InterfaceTermSet(iface *types.Interface) ([]*Term, error) {
|
||||
return computeTermSet(iface)
|
||||
}
|
||||
|
||||
// UnionTermSet computes the normalized terms for a union, returning an error
|
||||
// if the term set cannot be computed or is empty. In the latter case, the
|
||||
// error will be ErrEmptyTypeSet.
|
||||
//
|
||||
// See the documentation of StructuralTerms for more information on
|
||||
// normalization.
|
||||
func UnionTermSet(union *Union) ([]*Term, error) {
|
||||
return computeTermSet(union)
|
||||
}
|
||||
|
||||
func computeTermSet(typ types.Type) ([]*Term, error) {
|
||||
tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tset.terms.isEmpty() {
|
||||
return nil, ErrEmptyTypeSet
|
||||
}
|
||||
if tset.terms.isAll() {
|
||||
return nil, nil
|
||||
}
|
||||
var terms []*Term
|
||||
for _, term := range tset.terms {
|
||||
terms = append(terms, NewTerm(term.tilde, term.typ))
|
||||
}
|
||||
return terms, nil
|
||||
}
|
||||
|
||||
// A termSet holds the normalized set of terms for a given type.
|
||||
//
|
||||
// The name termSet is intentionally distinct from 'type set': a type set is
|
||||
// all types that implement a type (and includes method restrictions), whereas
|
||||
// a term set just represents the structural restrictions on a type.
|
||||
type termSet struct {
|
||||
complete bool
|
||||
terms termlist
|
||||
}
|
||||
|
||||
func indentf(depth int, format string, args ...interface{}) {
|
||||
fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...)
|
||||
}
|
||||
|
||||
func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) {
|
||||
if t == nil {
|
||||
panic("nil type")
|
||||
}
|
||||
|
||||
if debug {
|
||||
indentf(depth, "%s", t.String())
|
||||
defer func() {
|
||||
if err != nil {
|
||||
indentf(depth, "=> %s", err)
|
||||
} else {
|
||||
indentf(depth, "=> %s", res.terms.String())
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
const maxTermCount = 100
|
||||
if tset, ok := seen[t]; ok {
|
||||
if !tset.complete {
|
||||
return nil, fmt.Errorf("cycle detected in the declaration of %s", t)
|
||||
}
|
||||
return tset, nil
|
||||
}
|
||||
|
||||
// Mark the current type as seen to avoid infinite recursion.
|
||||
tset := new(termSet)
|
||||
defer func() {
|
||||
tset.complete = true
|
||||
}()
|
||||
seen[t] = tset
|
||||
|
||||
switch u := t.Underlying().(type) {
|
||||
case *types.Interface:
|
||||
// The term set of an interface is the intersection of the term sets of its
|
||||
// embedded types.
|
||||
tset.terms = allTermlist
|
||||
for i := 0; i < u.NumEmbeddeds(); i++ {
|
||||
embedded := u.EmbeddedType(i)
|
||||
if _, ok := embedded.Underlying().(*TypeParam); ok {
|
||||
return nil, fmt.Errorf("invalid embedded type %T", embedded)
|
||||
}
|
||||
tset2, err := computeTermSetInternal(embedded, seen, depth+1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tset.terms = tset.terms.intersect(tset2.terms)
|
||||
}
|
||||
case *Union:
|
||||
// The term set of a union is the union of term sets of its terms.
|
||||
tset.terms = nil
|
||||
for i := 0; i < u.Len(); i++ {
|
||||
t := u.Term(i)
|
||||
var terms termlist
|
||||
switch t.Type().Underlying().(type) {
|
||||
case *types.Interface:
|
||||
tset2, err := computeTermSetInternal(t.Type(), seen, depth+1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
terms = tset2.terms
|
||||
case *TypeParam, *Union:
|
||||
// A stand-alone type parameter or union is not permitted as union
|
||||
// term.
|
||||
return nil, fmt.Errorf("invalid union term %T", t)
|
||||
default:
|
||||
if t.Type() == types.Typ[types.Invalid] {
|
||||
continue
|
||||
}
|
||||
terms = termlist{{t.Tilde(), t.Type()}}
|
||||
}
|
||||
tset.terms = tset.terms.union(terms)
|
||||
if len(tset.terms) > maxTermCount {
|
||||
return nil, fmt.Errorf("exceeded max term count %d", maxTermCount)
|
||||
}
|
||||
}
|
||||
case *TypeParam:
|
||||
panic("unreachable")
|
||||
default:
|
||||
// For all other types, the term set is just a single non-tilde term
|
||||
// holding the type itself.
|
||||
if u != types.Typ[types.Invalid] {
|
||||
tset.terms = termlist{{false, t}}
|
||||
}
|
||||
}
|
||||
return tset, nil
|
||||
}
|
||||
|
||||
// under is a facade for the go/types internal function of the same name. It is
|
||||
// used by typeterm.go.
|
||||
func under(t types.Type) types.Type {
|
||||
return t.Underlying()
|
||||
}
|
172
vendor/golang.org/x/tools/internal/typeparams/termlist.go
generated
vendored
Normal file
172
vendor/golang.org/x/tools/internal/typeparams/termlist.go
generated
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Code generated by copytermlist.go DO NOT EDIT.
|
||||
|
||||
package typeparams
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"go/types"
|
||||
)
|
||||
|
||||
// A termlist represents the type set represented by the union
|
||||
// t1 ∪ y2 ∪ ... tn of the type sets of the terms t1 to tn.
|
||||
// A termlist is in normal form if all terms are disjoint.
|
||||
// termlist operations don't require the operands to be in
|
||||
// normal form.
|
||||
type termlist []*term
|
||||
|
||||
// allTermlist represents the set of all types.
|
||||
// It is in normal form.
|
||||
var allTermlist = termlist{new(term)}
|
||||
|
||||
// String prints the termlist exactly (without normalization).
|
||||
func (xl termlist) String() string {
|
||||
if len(xl) == 0 {
|
||||
return "∅"
|
||||
}
|
||||
var buf bytes.Buffer
|
||||
for i, x := range xl {
|
||||
if i > 0 {
|
||||
buf.WriteString(" ∪ ")
|
||||
}
|
||||
buf.WriteString(x.String())
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// isEmpty reports whether the termlist xl represents the empty set of types.
|
||||
func (xl termlist) isEmpty() bool {
|
||||
// If there's a non-nil term, the entire list is not empty.
|
||||
// If the termlist is in normal form, this requires at most
|
||||
// one iteration.
|
||||
for _, x := range xl {
|
||||
if x != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// isAll reports whether the termlist xl represents the set of all types.
|
||||
func (xl termlist) isAll() bool {
|
||||
// If there's a 𝓤 term, the entire list is 𝓤.
|
||||
// If the termlist is in normal form, this requires at most
|
||||
// one iteration.
|
||||
for _, x := range xl {
|
||||
if x != nil && x.typ == nil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// norm returns the normal form of xl.
|
||||
func (xl termlist) norm() termlist {
|
||||
// Quadratic algorithm, but good enough for now.
|
||||
// TODO(gri) fix asymptotic performance
|
||||
used := make([]bool, len(xl))
|
||||
var rl termlist
|
||||
for i, xi := range xl {
|
||||
if xi == nil || used[i] {
|
||||
continue
|
||||
}
|
||||
for j := i + 1; j < len(xl); j++ {
|
||||
xj := xl[j]
|
||||
if xj == nil || used[j] {
|
||||
continue
|
||||
}
|
||||
if u1, u2 := xi.union(xj); u2 == nil {
|
||||
// If we encounter a 𝓤 term, the entire list is 𝓤.
|
||||
// Exit early.
|
||||
// (Note that this is not just an optimization;
|
||||
// if we continue, we may end up with a 𝓤 term
|
||||
// and other terms and the result would not be
|
||||
// in normal form.)
|
||||
if u1.typ == nil {
|
||||
return allTermlist
|
||||
}
|
||||
xi = u1
|
||||
used[j] = true // xj is now unioned into xi - ignore it in future iterations
|
||||
}
|
||||
}
|
||||
rl = append(rl, xi)
|
||||
}
|
||||
return rl
|
||||
}
|
||||
|
||||
// If the type set represented by xl is specified by a single (non-𝓤) term,
|
||||
// structuralType returns that type. Otherwise it returns nil.
|
||||
func (xl termlist) structuralType() types.Type {
|
||||
if nl := xl.norm(); len(nl) == 1 {
|
||||
return nl[0].typ // if nl.isAll() then typ is nil, which is ok
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// union returns the union xl ∪ yl.
|
||||
func (xl termlist) union(yl termlist) termlist {
|
||||
return append(xl, yl...).norm()
|
||||
}
|
||||
|
||||
// intersect returns the intersection xl ∩ yl.
|
||||
func (xl termlist) intersect(yl termlist) termlist {
|
||||
if xl.isEmpty() || yl.isEmpty() {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Quadratic algorithm, but good enough for now.
|
||||
// TODO(gri) fix asymptotic performance
|
||||
var rl termlist
|
||||
for _, x := range xl {
|
||||
for _, y := range yl {
|
||||
if r := x.intersect(y); r != nil {
|
||||
rl = append(rl, r)
|
||||
}
|
||||
}
|
||||
}
|
||||
return rl.norm()
|
||||
}
|
||||
|
||||
// equal reports whether xl and yl represent the same type set.
|
||||
func (xl termlist) equal(yl termlist) bool {
|
||||
// TODO(gri) this should be more efficient
|
||||
return xl.subsetOf(yl) && yl.subsetOf(xl)
|
||||
}
|
||||
|
||||
// includes reports whether t ∈ xl.
|
||||
func (xl termlist) includes(t types.Type) bool {
|
||||
for _, x := range xl {
|
||||
if x.includes(t) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// supersetOf reports whether y ⊆ xl.
|
||||
func (xl termlist) supersetOf(y *term) bool {
|
||||
for _, x := range xl {
|
||||
if y.subsetOf(x) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// subsetOf reports whether xl ⊆ yl.
|
||||
func (xl termlist) subsetOf(yl termlist) bool {
|
||||
if yl.isEmpty() {
|
||||
return xl.isEmpty()
|
||||
}
|
||||
|
||||
// each term x of xl must be a subset of yl
|
||||
for _, x := range xl {
|
||||
if !yl.supersetOf(x) {
|
||||
return false // x is not a subset yl
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
113
vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
generated
vendored
113
vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
generated
vendored
@ -2,13 +2,14 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !typeparams || !go1.18
|
||||
// +build !typeparams !go1.18
|
||||
//go:build !go1.18
|
||||
// +build !go1.18
|
||||
|
||||
package typeparams
|
||||
|
||||
import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"go/types"
|
||||
)
|
||||
|
||||
@ -30,6 +31,34 @@ func GetIndexExprData(n ast.Node) *IndexExprData {
|
||||
return nil
|
||||
}
|
||||
|
||||
// PackIndexExpr returns an *ast.IndexExpr with the given index.
|
||||
// Calling PackIndexExpr with len(indices) != 1 will panic.
|
||||
func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
|
||||
switch len(indices) {
|
||||
case 0:
|
||||
panic("empty indices")
|
||||
case 1:
|
||||
return &ast.IndexExpr{
|
||||
X: x,
|
||||
Lbrack: lbrack,
|
||||
Index: indices[0],
|
||||
Rbrack: rbrack,
|
||||
}
|
||||
default:
|
||||
panic("cannot pack multiple indices at this go version")
|
||||
}
|
||||
}
|
||||
|
||||
// IndexListExpr is a placeholder type, as type parameters are not supported at
|
||||
// this Go version. Its methods panic on use.
|
||||
type IndexListExpr struct {
|
||||
ast.Expr
|
||||
X ast.Expr // expression
|
||||
Lbrack token.Pos // position of "["
|
||||
Indices []ast.Expr // index expressions
|
||||
Rbrack token.Pos // position of "]"
|
||||
}
|
||||
|
||||
// ForTypeSpec returns an empty field list, as type parameters on not supported
|
||||
// at this Go version.
|
||||
func ForTypeSpec(*ast.TypeSpec) *ast.FieldList {
|
||||
@ -46,6 +75,7 @@ func ForFuncType(*ast.FuncType) *ast.FieldList {
|
||||
// this Go version. Its methods panic on use.
|
||||
type TypeParam struct{ types.Type }
|
||||
|
||||
func (*TypeParam) Index() int { unsupported(); return 0 }
|
||||
func (*TypeParam) Constraint() types.Type { unsupported(); return nil }
|
||||
func (*TypeParam) Obj() *types.TypeName { unsupported(); return nil }
|
||||
|
||||
@ -72,42 +102,46 @@ func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) {
|
||||
unsupported()
|
||||
}
|
||||
|
||||
// NewSignatureType calls types.NewSignature, panicking if recvTypeParams or
|
||||
// typeParams is non-empty.
|
||||
func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature {
|
||||
if len(recvTypeParams) != 0 || len(typeParams) != 0 {
|
||||
panic("signatures cannot have type parameters at this Go version")
|
||||
}
|
||||
return types.NewSignature(recv, params, results, variadic)
|
||||
}
|
||||
|
||||
// ForSignature returns an empty slice.
|
||||
func ForSignature(*types.Signature) *TypeParamList {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetForSignature panics if tparams is non-empty.
|
||||
func SetForSignature(_ *types.Signature, tparams []*TypeParam) {
|
||||
if len(tparams) > 0 {
|
||||
unsupported()
|
||||
}
|
||||
}
|
||||
|
||||
// RecvTypeParams returns a nil slice.
|
||||
func RecvTypeParams(sig *types.Signature) *TypeParamList {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetRecvTypeParams panics if rparams is non-empty.
|
||||
func SetRecvTypeParams(sig *types.Signature, rparams []*TypeParam) {
|
||||
if len(rparams) > 0 {
|
||||
unsupported()
|
||||
}
|
||||
}
|
||||
|
||||
// IsComparable returns false, as no interfaces are type-restricted at this Go
|
||||
// version.
|
||||
func IsComparable(*types.Interface) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsConstraint returns false, as no interfaces are type-restricted at this Go
|
||||
// IsMethodSet returns true, as no interfaces are type-restricted at this Go
|
||||
// version.
|
||||
func IsConstraint(*types.Interface) bool {
|
||||
func IsMethodSet(*types.Interface) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsImplicit returns false, as no interfaces are implicit at this Go version.
|
||||
func IsImplicit(*types.Interface) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// MarkImplicit does nothing, because this Go version does not have implicit
|
||||
// interfaces.
|
||||
func MarkImplicit(*types.Interface) {}
|
||||
|
||||
// ForNamed returns an empty type parameter list, as type parameters are not
|
||||
// supported at this Go version.
|
||||
func ForNamed(*types.Named) *TypeParamList {
|
||||
@ -131,19 +165,25 @@ func NamedTypeOrigin(named *types.Named) types.Type {
|
||||
return named
|
||||
}
|
||||
|
||||
// Term is a placeholder type, as type parameters are not supported at this Go
|
||||
// version. Its methods panic on use.
|
||||
type Term struct{}
|
||||
// Term holds information about a structural type restriction.
|
||||
type Term struct {
|
||||
tilde bool
|
||||
typ types.Type
|
||||
}
|
||||
|
||||
func (*Term) Tilde() bool { unsupported(); return false }
|
||||
func (*Term) Type() types.Type { unsupported(); return nil }
|
||||
func (*Term) String() string { unsupported(); return "" }
|
||||
func (*Term) Underlying() types.Type { unsupported(); return nil }
|
||||
func (m *Term) Tilde() bool { return m.tilde }
|
||||
func (m *Term) Type() types.Type { return m.typ }
|
||||
func (m *Term) String() string {
|
||||
pre := ""
|
||||
if m.tilde {
|
||||
pre = "~"
|
||||
}
|
||||
return pre + m.typ.String()
|
||||
}
|
||||
|
||||
// NewTerm is unsupported at this Go version, and panics.
|
||||
func NewTerm(tilde bool, typ types.Type) *Term {
|
||||
unsupported()
|
||||
return nil
|
||||
return &Term{tilde, typ}
|
||||
}
|
||||
|
||||
// Union is a placeholder type, as type parameters are not supported at this Go
|
||||
@ -162,16 +202,23 @@ func NewUnion(terms []*Term) *Union {
|
||||
// InitInstanceInfo is a noop at this Go version.
|
||||
func InitInstanceInfo(*types.Info) {}
|
||||
|
||||
// GetInstance returns nothing, as type parameters are not supported at this Go
|
||||
// version.
|
||||
func GetInstance(*types.Info, *ast.Ident) (*TypeList, types.Type) { return nil, nil }
|
||||
// Instance is a placeholder type, as type parameters are not supported at this
|
||||
// Go version.
|
||||
type Instance struct {
|
||||
TypeArgs *TypeList
|
||||
Type types.Type
|
||||
}
|
||||
|
||||
// Environment is a placeholder type, as type parameters are not supported at
|
||||
// GetInstances returns a nil map, as type parameters are not supported at this
|
||||
// Go version.
|
||||
func GetInstances(info *types.Info) map[*ast.Ident]Instance { return nil }
|
||||
|
||||
// Context is a placeholder type, as type parameters are not supported at
|
||||
// this Go version.
|
||||
type Environment struct{}
|
||||
type Context struct{}
|
||||
|
||||
// Instantiate is unsupported on this Go version, and panics.
|
||||
func Instantiate(env *Environment, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
|
||||
func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
|
||||
unsupported()
|
||||
return nil, nil
|
||||
}
|
||||
|
87
vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
generated
vendored
87
vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
generated
vendored
@ -2,13 +2,14 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build typeparams && go1.18
|
||||
// +build typeparams,go1.18
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package typeparams
|
||||
|
||||
import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"go/types"
|
||||
)
|
||||
|
||||
@ -21,6 +22,7 @@
|
||||
//
|
||||
// For nodes that don't represent index expressions, GetIndexExprData returns
|
||||
// nil.
|
||||
// TODO(rfindley): remove this function in favor of using the alias below.
|
||||
func GetIndexExprData(n ast.Node) *IndexExprData {
|
||||
switch e := n.(type) {
|
||||
case *ast.IndexExpr:
|
||||
@ -36,6 +38,33 @@ func GetIndexExprData(n ast.Node) *IndexExprData {
|
||||
return nil
|
||||
}
|
||||
|
||||
// PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on
|
||||
// the cardinality of indices. Calling PackIndexExpr with len(indices) == 0
|
||||
// will panic.
|
||||
func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
|
||||
switch len(indices) {
|
||||
case 0:
|
||||
panic("empty indices")
|
||||
case 1:
|
||||
return &ast.IndexExpr{
|
||||
X: x,
|
||||
Lbrack: lbrack,
|
||||
Index: indices[0],
|
||||
Rbrack: rbrack,
|
||||
}
|
||||
default:
|
||||
return &ast.IndexListExpr{
|
||||
X: x,
|
||||
Lbrack: lbrack,
|
||||
Indices: indices,
|
||||
Rbrack: rbrack,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// IndexListExpr is an alias for ast.IndexListExpr.
|
||||
type IndexListExpr = ast.IndexListExpr
|
||||
|
||||
// ForTypeSpec returns n.TypeParams.
|
||||
func ForTypeSpec(n *ast.TypeSpec) *ast.FieldList {
|
||||
if n == nil {
|
||||
@ -71,34 +100,39 @@ func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) {
|
||||
tparam.SetConstraint(constraint)
|
||||
}
|
||||
|
||||
// NewSignatureType calls types.NewSignatureType.
|
||||
func NewSignatureType(recv *types.Var, recvTypeParams, typeParams []*TypeParam, params, results *types.Tuple, variadic bool) *types.Signature {
|
||||
return types.NewSignatureType(recv, recvTypeParams, typeParams, params, results, variadic)
|
||||
}
|
||||
|
||||
// ForSignature returns sig.TypeParams()
|
||||
func ForSignature(sig *types.Signature) *TypeParamList {
|
||||
return sig.TypeParams()
|
||||
}
|
||||
|
||||
// SetForSignature calls sig.SetTypeParams(tparams)
|
||||
func SetForSignature(sig *types.Signature, tparams []*TypeParam) {
|
||||
sig.SetTypeParams(tparams)
|
||||
}
|
||||
|
||||
// RecvTypeParams returns sig.RecvTypeParams().
|
||||
func RecvTypeParams(sig *types.Signature) *TypeParamList {
|
||||
return sig.RecvTypeParams()
|
||||
}
|
||||
|
||||
// SetRecvTypeParams calls sig.SetRecvTypeParams(rparams).
|
||||
func SetRecvTypeParams(sig *types.Signature, rparams []*TypeParam) {
|
||||
sig.SetRecvTypeParams(rparams)
|
||||
}
|
||||
|
||||
// IsComparable calls iface.IsComparable().
|
||||
func IsComparable(iface *types.Interface) bool {
|
||||
return iface.IsComparable()
|
||||
}
|
||||
|
||||
// IsConstraint calls iface.IsConstraint().
|
||||
func IsConstraint(iface *types.Interface) bool {
|
||||
return iface.IsConstraint()
|
||||
// IsMethodSet calls iface.IsMethodSet().
|
||||
func IsMethodSet(iface *types.Interface) bool {
|
||||
return iface.IsMethodSet()
|
||||
}
|
||||
|
||||
// IsImplicit calls iface.IsImplicit().
|
||||
func IsImplicit(iface *types.Interface) bool {
|
||||
return iface.IsImplicit()
|
||||
}
|
||||
|
||||
// MarkImplicit calls iface.MarkImplicit().
|
||||
func MarkImplicit(iface *types.Interface) {
|
||||
iface.MarkImplicit()
|
||||
}
|
||||
|
||||
// ForNamed extracts the (possibly empty) type parameter object list from
|
||||
@ -145,21 +179,18 @@ func InitInstanceInfo(info *types.Info) {
|
||||
info.Instances = make(map[*ast.Ident]types.Instance)
|
||||
}
|
||||
|
||||
// GetInstance extracts information about the instantiation occurring at the
|
||||
// identifier id. id should be the identifier denoting a parameterized type or
|
||||
// function in an instantiation expression or function call.
|
||||
func GetInstance(info *types.Info, id *ast.Ident) (*TypeList, types.Type) {
|
||||
if info.Instances != nil {
|
||||
inf := info.Instances[id]
|
||||
return inf.TypeArgs, inf.Type
|
||||
}
|
||||
return nil, nil
|
||||
// Instance is an alias for types.Instance.
|
||||
type Instance = types.Instance
|
||||
|
||||
// GetInstances returns info.Instances.
|
||||
func GetInstances(info *types.Info) map[*ast.Ident]Instance {
|
||||
return info.Instances
|
||||
}
|
||||
|
||||
// Environment is an alias for types.Environment.
|
||||
type Environment = types.Environment
|
||||
// Context is an alias for types.Context.
|
||||
type Context = types.Context
|
||||
|
||||
// Instantiate calls types.Instantiate.
|
||||
func Instantiate(env *Environment, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
|
||||
return types.Instantiate(env, typ, targs, validate)
|
||||
func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
|
||||
return types.Instantiate(ctxt, typ, targs, validate)
|
||||
}
|
||||
|
170
vendor/golang.org/x/tools/internal/typeparams/typeterm.go
generated
vendored
Normal file
170
vendor/golang.org/x/tools/internal/typeparams/typeterm.go
generated
vendored
Normal file
@ -0,0 +1,170 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Code generated by copytermlist.go DO NOT EDIT.
|
||||
|
||||
package typeparams
|
||||
|
||||
import "go/types"
|
||||
|
||||
// A term describes elementary type sets:
|
||||
//
|
||||
// ∅: (*term)(nil) == ∅ // set of no types (empty set)
|
||||
// 𝓤: &term{} == 𝓤 // set of all types (𝓤niverse)
|
||||
// T: &term{false, T} == {T} // set of type T
|
||||
// ~t: &term{true, t} == {t' | under(t') == t} // set of types with underlying type t
|
||||
//
|
||||
type term struct {
|
||||
tilde bool // valid if typ != nil
|
||||
typ types.Type
|
||||
}
|
||||
|
||||
func (x *term) String() string {
|
||||
switch {
|
||||
case x == nil:
|
||||
return "∅"
|
||||
case x.typ == nil:
|
||||
return "𝓤"
|
||||
case x.tilde:
|
||||
return "~" + x.typ.String()
|
||||
default:
|
||||
return x.typ.String()
|
||||
}
|
||||
}
|
||||
|
||||
// equal reports whether x and y represent the same type set.
|
||||
func (x *term) equal(y *term) bool {
|
||||
// easy cases
|
||||
switch {
|
||||
case x == nil || y == nil:
|
||||
return x == y
|
||||
case x.typ == nil || y.typ == nil:
|
||||
return x.typ == y.typ
|
||||
}
|
||||
// ∅ ⊂ x, y ⊂ 𝓤
|
||||
|
||||
return x.tilde == y.tilde && types.Identical(x.typ, y.typ)
|
||||
}
|
||||
|
||||
// union returns the union x ∪ y: zero, one, or two non-nil terms.
|
||||
func (x *term) union(y *term) (_, _ *term) {
|
||||
// easy cases
|
||||
switch {
|
||||
case x == nil && y == nil:
|
||||
return nil, nil // ∅ ∪ ∅ == ∅
|
||||
case x == nil:
|
||||
return y, nil // ∅ ∪ y == y
|
||||
case y == nil:
|
||||
return x, nil // x ∪ ∅ == x
|
||||
case x.typ == nil:
|
||||
return x, nil // 𝓤 ∪ y == 𝓤
|
||||
case y.typ == nil:
|
||||
return y, nil // x ∪ 𝓤 == 𝓤
|
||||
}
|
||||
// ∅ ⊂ x, y ⊂ 𝓤
|
||||
|
||||
if x.disjoint(y) {
|
||||
return x, y // x ∪ y == (x, y) if x ∩ y == ∅
|
||||
}
|
||||
// x.typ == y.typ
|
||||
|
||||
// ~t ∪ ~t == ~t
|
||||
// ~t ∪ T == ~t
|
||||
// T ∪ ~t == ~t
|
||||
// T ∪ T == T
|
||||
if x.tilde || !y.tilde {
|
||||
return x, nil
|
||||
}
|
||||
return y, nil
|
||||
}
|
||||
|
||||
// intersect returns the intersection x ∩ y.
|
||||
func (x *term) intersect(y *term) *term {
|
||||
// easy cases
|
||||
switch {
|
||||
case x == nil || y == nil:
|
||||
return nil // ∅ ∩ y == ∅ and ∩ ∅ == ∅
|
||||
case x.typ == nil:
|
||||
return y // 𝓤 ∩ y == y
|
||||
case y.typ == nil:
|
||||
return x // x ∩ 𝓤 == x
|
||||
}
|
||||
// ∅ ⊂ x, y ⊂ 𝓤
|
||||
|
||||
if x.disjoint(y) {
|
||||
return nil // x ∩ y == ∅ if x ∩ y == ∅
|
||||
}
|
||||
// x.typ == y.typ
|
||||
|
||||
// ~t ∩ ~t == ~t
|
||||
// ~t ∩ T == T
|
||||
// T ∩ ~t == T
|
||||
// T ∩ T == T
|
||||
if !x.tilde || y.tilde {
|
||||
return x
|
||||
}
|
||||
return y
|
||||
}
|
||||
|
||||
// includes reports whether t ∈ x.
|
||||
func (x *term) includes(t types.Type) bool {
|
||||
// easy cases
|
||||
switch {
|
||||
case x == nil:
|
||||
return false // t ∈ ∅ == false
|
||||
case x.typ == nil:
|
||||
return true // t ∈ 𝓤 == true
|
||||
}
|
||||
// ∅ ⊂ x ⊂ 𝓤
|
||||
|
||||
u := t
|
||||
if x.tilde {
|
||||
u = under(u)
|
||||
}
|
||||
return types.Identical(x.typ, u)
|
||||
}
|
||||
|
||||
// subsetOf reports whether x ⊆ y.
|
||||
func (x *term) subsetOf(y *term) bool {
|
||||
// easy cases
|
||||
switch {
|
||||
case x == nil:
|
||||
return true // ∅ ⊆ y == true
|
||||
case y == nil:
|
||||
return false // x ⊆ ∅ == false since x != ∅
|
||||
case y.typ == nil:
|
||||
return true // x ⊆ 𝓤 == true
|
||||
case x.typ == nil:
|
||||
return false // 𝓤 ⊆ y == false since y != 𝓤
|
||||
}
|
||||
// ∅ ⊂ x, y ⊂ 𝓤
|
||||
|
||||
if x.disjoint(y) {
|
||||
return false // x ⊆ y == false if x ∩ y == ∅
|
||||
}
|
||||
// x.typ == y.typ
|
||||
|
||||
// ~t ⊆ ~t == true
|
||||
// ~t ⊆ T == false
|
||||
// T ⊆ ~t == true
|
||||
// T ⊆ T == true
|
||||
return !x.tilde || y.tilde
|
||||
}
|
||||
|
||||
// disjoint reports whether x ∩ y == ∅.
|
||||
// x.typ and y.typ must not be nil.
|
||||
func (x *term) disjoint(y *term) bool {
|
||||
if debug && (x.typ == nil || y.typ == nil) {
|
||||
panic("invalid argument(s)")
|
||||
}
|
||||
ux := x.typ
|
||||
if y.tilde {
|
||||
ux = under(ux)
|
||||
}
|
||||
uy := y.typ
|
||||
if x.tilde {
|
||||
uy = under(uy)
|
||||
}
|
||||
return !types.Identical(ux, uy)
|
||||
}
|
2
vendor/gopkg.in/ini.v1/README.md
generated
vendored
2
vendor/gopkg.in/ini.v1/README.md
generated
vendored
@ -24,7 +24,7 @@ Package ini provides INI file read and write functionality in Go.
|
||||
|
||||
## Installation
|
||||
|
||||
The minimum requirement of Go is **1.6**.
|
||||
The minimum requirement of Go is **1.12**.
|
||||
|
||||
```sh
|
||||
$ go get gopkg.in/ini.v1
|
||||
|
11
vendor/gopkg.in/ini.v1/file.go
generated
vendored
11
vendor/gopkg.in/ini.v1/file.go
generated
vendored
@ -142,6 +142,12 @@ func (f *File) GetSection(name string) (*Section, error) {
|
||||
return secs[0], err
|
||||
}
|
||||
|
||||
// HasSection returns true if the file contains a section with given name.
|
||||
func (f *File) HasSection(name string) bool {
|
||||
section, _ := f.GetSection(name)
|
||||
return section != nil
|
||||
}
|
||||
|
||||
// SectionsByName returns all sections with given name.
|
||||
func (f *File) SectionsByName(name string) ([]*Section, error) {
|
||||
if len(name) == 0 {
|
||||
@ -168,8 +174,9 @@ func (f *File) SectionsByName(name string) ([]*Section, error) {
|
||||
func (f *File) Section(name string) *Section {
|
||||
sec, err := f.GetSection(name)
|
||||
if err != nil {
|
||||
// Note: It's OK here because the only possible error is empty section name,
|
||||
// but if it's empty, this piece of code won't be executed.
|
||||
if name == "" {
|
||||
name = DefaultSection
|
||||
}
|
||||
sec, _ = f.NewSection(name)
|
||||
return sec
|
||||
}
|
||||
|
26
vendor/gopkg.in/ini.v1/parser.go
generated
vendored
26
vendor/gopkg.in/ini.v1/parser.go
generated
vendored
@ -302,15 +302,9 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
||||
parserBufferPeekResult, _ := p.buf.Peek(bufferSize)
|
||||
peekBuffer := bytes.NewBuffer(parserBufferPeekResult)
|
||||
|
||||
indentSize := 0
|
||||
for {
|
||||
peekData, peekErr := peekBuffer.ReadBytes('\n')
|
||||
if peekErr != nil {
|
||||
if peekErr == io.EOF {
|
||||
p.debug("readPythonMultilines: io.EOF, peekData: %q, line: %q", string(peekData), line)
|
||||
return line, nil
|
||||
}
|
||||
|
||||
if peekErr != nil && peekErr != io.EOF {
|
||||
p.debug("readPythonMultilines: failed to peek with error: %v", peekErr)
|
||||
return "", peekErr
|
||||
}
|
||||
@ -329,19 +323,6 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
||||
return line, nil
|
||||
}
|
||||
|
||||
// Determine indent size and line prefix.
|
||||
currentIndentSize := len(peekMatches[1])
|
||||
if indentSize < 1 {
|
||||
indentSize = currentIndentSize
|
||||
p.debug("readPythonMultilines: indent size is %d", indentSize)
|
||||
}
|
||||
|
||||
// Make sure each line is indented at least as far as first line.
|
||||
if currentIndentSize < indentSize {
|
||||
p.debug("readPythonMultilines: end of value, current indent: %d, expected indent: %d, line: %q", currentIndentSize, indentSize, line)
|
||||
return line, nil
|
||||
}
|
||||
|
||||
// Advance the parser reader (buffer) in-sync with the peek buffer.
|
||||
_, err := p.buf.Discard(len(peekData))
|
||||
if err != nil {
|
||||
@ -349,8 +330,7 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Handle indented empty line.
|
||||
line += "\n" + peekMatches[1][indentSize:] + peekMatches[2]
|
||||
line += "\n" + peekMatches[0]
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,6 +441,8 @@ func (f *File) parse(reader io.Reader) (err error) {
|
||||
// Reset auto-counter and comments
|
||||
p.comment.Reset()
|
||||
p.count = 1
|
||||
// Nested values can't span sections
|
||||
isLastValueEmpty = false
|
||||
|
||||
inUnparseableSection = false
|
||||
for i := range f.options.UnparseableSections {
|
||||
|
3
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
3
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
@ -112,7 +112,8 @@ edit:
|
||||
|
||||
editor:
|
||||
gofmt -l -s -w *.go
|
||||
GO111MODULE=off go build -v -o $(GOPATH)/bin/ccgo modernc.org/ccgo/v3
|
||||
go build -v -o $(GOPATH)/bin/ccgo modernc.org/ccgo/v3
|
||||
go test -c -o /dev/null
|
||||
|
||||
later:
|
||||
@grep -n $(grep) LATER * || true
|
||||
|
147
vendor/modernc.org/ccgo/v3/lib/ccgo.go
generated
vendored
147
vendor/modernc.org/ccgo/v3/lib/ccgo.go
generated
vendored
@ -249,6 +249,7 @@ func init() {
|
||||
void *__builtin_mmap(void *addr, size_t length, int prot, int flags, int fd, __INTPTR_TYPE__ offset);
|
||||
void *__ccgo_va_arg(__builtin_va_list ap);
|
||||
void __builtin_abort(void);
|
||||
void __builtin_bzero(void *s, size_t n);
|
||||
void __builtin_exit(int status);
|
||||
void __builtin_free(void *ptr);
|
||||
void __builtin_prefetch (const void *addr, ...);
|
||||
@ -284,7 +285,6 @@ func init() {
|
||||
|
||||
func origin(skip int) string {
|
||||
pc, fn, fl, _ := runtime.Caller(skip)
|
||||
fn = filepath.Base(fn)
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fns string
|
||||
if f != nil {
|
||||
@ -296,32 +296,20 @@ func origin(skip int) string {
|
||||
return fmt.Sprintf("%s:%d:%s", fn, fl, fns)
|
||||
}
|
||||
|
||||
func todo(s string, args ...interface{}) string { //TODO-
|
||||
func todo(s string, args ...interface{}) string {
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
default:
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
pc, fn, fl, _ := runtime.Caller(1)
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fns string
|
||||
if f != nil {
|
||||
fns = f.Name()
|
||||
if x := strings.LastIndex(fns, "."); x > 0 {
|
||||
fns = fns[x+1:]
|
||||
}
|
||||
}
|
||||
r := fmt.Sprintf("%s:%d:%s: TODOTODO %s", fn, fl, fns, s) //TODOOK
|
||||
if dmesgs {
|
||||
dmesg("%v: %v", origin(1), r)
|
||||
}
|
||||
r := fmt.Sprintf("%s\n\tTODO %s", origin(2), s) //TODOOK
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
os.Stdout.Sync()
|
||||
return r
|
||||
}
|
||||
|
||||
func trc(s string, args ...interface{}) string { //TODO-
|
||||
func trc(s string, args ...interface{}) string {
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
@ -329,8 +317,8 @@ func trc(s string, args ...interface{}) string { //TODO-
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
r := fmt.Sprintf("%s: TRC %s", origin(2), s)
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
os.Stdout.Sync()
|
||||
fmt.Fprintf(os.Stderr, "%s\n", r)
|
||||
os.Stderr.Sync()
|
||||
return r
|
||||
}
|
||||
|
||||
@ -367,7 +355,8 @@ type Task struct {
|
||||
hostIncludes []string
|
||||
hostPredefined string
|
||||
hostSysIncludes []string
|
||||
ignoredIncludes string // -ignored-includes
|
||||
ignoredIncludes string // -ignored-includes
|
||||
ignoredObjects map[string]struct{} // -ignore-object
|
||||
imported []*imported
|
||||
includedFiles map[string]struct{}
|
||||
l []string // -l
|
||||
@ -395,37 +384,37 @@ type Task struct {
|
||||
// feature should ever set it.
|
||||
CallOutBinary string
|
||||
|
||||
E bool // -E
|
||||
allErrors bool // -all-errors
|
||||
compiledbValid bool // -compiledb present
|
||||
configSaved bool
|
||||
configured bool // hostPredefined, hostIncludes, hostSysIncludes are valid
|
||||
cover bool // -cover-instrumentation
|
||||
coverC bool // -cover-instrumentation-c
|
||||
defaultUnExport bool // -unexported-by-default
|
||||
errTrace bool // -err-trace
|
||||
exportDefinesValid bool // -export-defines present
|
||||
exportEnumsValid bool // -export-enums present
|
||||
exportExternsValid bool // -export-externs present
|
||||
exportFieldsValid bool // -export-fields present
|
||||
exportStructsValid bool // -export-structs present
|
||||
exportTypedefsValid bool // -export-typedefs present
|
||||
fullPathComments bool // -full-path-comments
|
||||
funcSig bool // -func-sig
|
||||
header bool // -header
|
||||
ignoreUndefined bool // -ignoreUndefined
|
||||
isScripted bool
|
||||
mingw bool
|
||||
noCapi bool // -nocapi
|
||||
nostdinc bool // -nostdinc
|
||||
nostdlib bool // -nostdlib
|
||||
panicStubs bool // -panic-stubs
|
||||
tracePinning bool // -trace-pinning
|
||||
traceTranslationUnits bool // -trace-translation-units
|
||||
verifyStructs bool // -verify-structs
|
||||
version bool // -version
|
||||
watch bool // -watch-instrumentation
|
||||
windows bool // -windows
|
||||
E bool // -E
|
||||
allErrors bool // -all-errors
|
||||
compiledbValid bool // -compiledb present
|
||||
configSaved bool
|
||||
configured bool // hostPredefined, hostIncludes, hostSysIncludes are valid
|
||||
cover bool // -cover-instrumentation
|
||||
coverC bool // -cover-instrumentation-c
|
||||
defaultUnExport bool // -unexported-by-default
|
||||
errTrace bool // -err-trace
|
||||
exportDefinesValid bool // -export-defines present
|
||||
exportEnumsValid bool // -export-enums present
|
||||
exportExternsValid bool // -export-externs present
|
||||
exportFieldsValid bool // -export-fields present
|
||||
exportStructsValid bool // -export-structs present
|
||||
exportTypedefsValid bool // -export-typedefs present
|
||||
fullPathComments bool // -full-path-comments
|
||||
funcSig bool // -func-sig
|
||||
header bool // -header
|
||||
ignoreUnsupportedAligment bool // -ignore-unsupported-alignment
|
||||
isScripted bool
|
||||
mingw bool
|
||||
noCapi bool // -nocapi
|
||||
nostdinc bool // -nostdinc
|
||||
nostdlib bool // -nostdlib
|
||||
panicStubs bool // -panic-stubs
|
||||
tracePinning bool // -trace-pinning
|
||||
traceTranslationUnits bool // -trace-translation-units
|
||||
verifyStructs bool // -verify-structs
|
||||
version bool // -version
|
||||
watch bool // -watch-instrumentation
|
||||
windows bool // -windows
|
||||
}
|
||||
|
||||
// NewTask returns a newly created Task.
|
||||
@ -617,7 +606,6 @@ func (t *Task) capi2(files []string) (pkgName string, exports map[string]struct{
|
||||
|
||||
// Main executes task.
|
||||
func (t *Task) Main() (err error) {
|
||||
// trc("%p: %q", t, t.args)
|
||||
if dmesgs {
|
||||
defer func() {
|
||||
if err != nil {
|
||||
@ -681,7 +669,7 @@ func (t *Task) Main() (err error) {
|
||||
opts.Opt("full-path-comments", func(opt string) error { t.fullPathComments = true; return nil })
|
||||
opts.Opt("func-sig", func(opt string) error { t.funcSig = true; return nil })
|
||||
opts.Opt("header", func(opt string) error { t.header = true; return nil })
|
||||
opts.Opt("ignore-undefined", func(opt string) error { t.ignoreUndefined = true; return nil })
|
||||
opts.Opt("ignore-unsupported-alignment", func(opt string) error { t.ignoreUnsupportedAligment = true; return nil })
|
||||
opts.Opt("nocapi", func(opt string) error { t.noCapi = true; return nil })
|
||||
opts.Opt("nostdinc", func(opt string) error { t.nostdinc = true; return nil })
|
||||
opts.Opt("panic-stubs", func(opt string) error { t.panicStubs = true; return nil })
|
||||
@ -710,6 +698,13 @@ func (t *Task) Main() (err error) {
|
||||
}
|
||||
return nil
|
||||
})
|
||||
opts.Arg("ignore-object", false, func(arg, value string) error {
|
||||
if t.ignoredObjects == nil {
|
||||
t.ignoredObjects = map[string]struct{}{}
|
||||
}
|
||||
t.ignoredObjects[value] = struct{}{}
|
||||
return nil
|
||||
})
|
||||
opts.Arg("save-config", false, func(arg, value string) error {
|
||||
if value == "" {
|
||||
return nil
|
||||
@ -1120,6 +1115,9 @@ func (t *Task) link() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
if out, e := exec.Command("gofmt", "-r", "(x) -> x", "-l", "-s", "-w", t.o).CombinedOutput(); e != nil && err == nil {
|
||||
err = fmt.Errorf(strings.Join([]string{string(out), e.Error()}, ": "))
|
||||
}
|
||||
if out, e := exec.Command("gofmt", "-l", "-s", "-w", t.o).CombinedOutput(); e != nil && err == nil {
|
||||
err = fmt.Errorf(strings.Join([]string{string(out), e.Error()}, ": "))
|
||||
}
|
||||
@ -1232,7 +1230,7 @@ type cdb struct {
|
||||
outputIndex map[string][]*cdbItem
|
||||
}
|
||||
|
||||
func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, path []string, cc, ar string) error {
|
||||
func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, path []string, cc, ar string, ignored map[string]struct{}) error {
|
||||
// trc("%v: nm %q ver %v seqLimit %v path %q cc %q ar %q", origin(1), nm, ver, seqLimit, path, cc, ar)
|
||||
var item *cdbItem
|
||||
var k string
|
||||
@ -1292,6 +1290,12 @@ func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, path
|
||||
}
|
||||
}
|
||||
if item == nil {
|
||||
for k := range ignored {
|
||||
if k == nm || strings.HasSuffix(nm, k) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("not found in compile DB: %s (max seq %d), path %v", k, seqLimit, path)
|
||||
}
|
||||
|
||||
@ -1302,7 +1306,7 @@ func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, path
|
||||
obj[k] = item
|
||||
var errs []string
|
||||
for _, v := range item.sources(cc, ar) {
|
||||
if err := db.find(obj, v, -1, item.seq, append(path, nm), cc, ar); err != nil {
|
||||
if err := db.find(obj, v, -1, item.seq, append(path, nm), cc, ar, ignored); err != nil {
|
||||
errs = append(errs, err.Error())
|
||||
}
|
||||
}
|
||||
@ -1380,7 +1384,7 @@ func (t *Task) useCompileDB(fn string, args []string) error {
|
||||
notFound := false
|
||||
for _, v := range args {
|
||||
v, ver := suffixNum(v, 0)
|
||||
if err := cdb.find(obj, v, ver, -1, nil, t.ccLookPath, t.arLookPath); err != nil {
|
||||
if err := cdb.find(obj, v, ver, -1, nil, t.ccLookPath, t.arLookPath, t.ignoredObjects); err != nil {
|
||||
notFound = true
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
@ -1584,9 +1588,19 @@ func hasPlusPrefix(s string) (n int, r string) {
|
||||
}
|
||||
|
||||
func makeXParser(s string) (r []string, err error) {
|
||||
n, s := hasPlusPrefix(s)
|
||||
if n == 0 {
|
||||
return nil, nil
|
||||
switch {
|
||||
case strings.HasPrefix(s, "libtool: link: ar "):
|
||||
s = s[len("libtool: link:"):]
|
||||
case strings.HasPrefix(s, "libtool: compile: "):
|
||||
s = s[len("libtool: compile:"):]
|
||||
for strings.HasPrefix(s, " ") {
|
||||
s = s[1:]
|
||||
}
|
||||
default:
|
||||
var n int
|
||||
if n, s = hasPlusPrefix(s); n == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(s, " ") {
|
||||
@ -1600,6 +1614,9 @@ func makeXParser(s string) (r []string, err error) {
|
||||
return nil, nil // ignore
|
||||
}
|
||||
}
|
||||
if len(r) != 0 && filepath.Base(r[0]) == "libtool" {
|
||||
r[0] = "libtool"
|
||||
}
|
||||
return r, err
|
||||
}
|
||||
|
||||
@ -1692,13 +1709,20 @@ func (it *cdbItem) ccgoArgs(cc string) (r []string, err error) {
|
||||
strings.HasPrefix(arg, "-m"):
|
||||
|
||||
// nop
|
||||
case strings.HasPrefix(arg, ">"):
|
||||
return opt.Skip(nil)
|
||||
default:
|
||||
return fmt.Errorf("unknown/unsupported CC option: %s", arg)
|
||||
}
|
||||
|
||||
return nil
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
switch err.(type) {
|
||||
case opt.Skip:
|
||||
// ok
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return r, nil
|
||||
@ -1756,6 +1780,7 @@ func (it *cdbItem) sources(cc, ar string) (r []string) {
|
||||
case
|
||||
"libtool",
|
||||
ar,
|
||||
filepath.Base(ar),
|
||||
cc:
|
||||
|
||||
var prev string
|
||||
@ -1780,6 +1805,7 @@ type cdbMakeWriter struct {
|
||||
b bytes.Buffer
|
||||
cc string
|
||||
ar string
|
||||
arBase string
|
||||
dir string
|
||||
err error
|
||||
it cdbItem
|
||||
@ -1793,6 +1819,7 @@ func (t *Task) newCdbMakeWriter(w *cdbWriter, dir string, parser func(s string)
|
||||
r := &cdbMakeWriter{
|
||||
cc: t.ccLookPath,
|
||||
ar: t.arLookPath,
|
||||
arBase: filepath.Base(t.arLookPath),
|
||||
dir: dir,
|
||||
parser: parser,
|
||||
w: w,
|
||||
@ -1868,6 +1895,8 @@ func (w *cdbMakeWriter) Write(b []byte) (int, error) {
|
||||
fmt.Printf("CCGO CC: %q\n", args)
|
||||
err = w.handleGCC(args)
|
||||
case w.ar:
|
||||
fallthrough
|
||||
case w.arBase:
|
||||
if isCreateArchive(args[1]) {
|
||||
fmt.Printf("CCGO AR: %q\n", args)
|
||||
err = w.handleAR(args)
|
||||
|
786
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
786
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
File diff suppressed because it is too large
Load Diff
10
vendor/modernc.org/ccgo/v3/lib/init.go
generated
vendored
10
vendor/modernc.org/ccgo/v3/lib/init.go
generated
vendored
@ -59,7 +59,7 @@ func (p *project) initializerInner(tag string, off uintptr, f *function, s []*cc
|
||||
tld.patches = append(tld.patches, initPatch{t, s[0], patchField})
|
||||
p.w(" 0 ")
|
||||
default:
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, fOutermost)
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, 0)
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -79,7 +79,7 @@ func (p *project) initializerInner(tag string, off uintptr, f *function, s []*cc
|
||||
case cc.Struct, cc.Union:
|
||||
if compatibleStructOrUnion(t, s[0].AssignmentExpression.Operand.Type()) {
|
||||
p.w("%s%s", tidyComment("", s[0]), tag)
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, fOutermost)
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, 0)
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -258,7 +258,7 @@ func (p *project) initializerStruct(tag string, off uintptr, f *function, s []*c
|
||||
bitFld := v.Field
|
||||
p.w("%s%s", tidyComment("", v.AssignmentExpression), tag)
|
||||
tag = ""
|
||||
p.assignmentExpression(f, v.AssignmentExpression, bft, exprValue, fOutermost)
|
||||
p.assignmentExpression(f, v.AssignmentExpression, bft, exprValue, 0)
|
||||
p.w("&%#x", uint64(1)<<uint64(bitFld.BitFieldWidth())-1)
|
||||
if o := bitFld.BitFieldOffset() + 8*int((bitFld.Offset()-off0)); o != 0 {
|
||||
p.w("<<%d", o)
|
||||
@ -387,14 +387,14 @@ func (p *project) initializerUnion(tag string, off uintptr, f *function, s []*cc
|
||||
case fld != nil && fld.IsBitField():
|
||||
bft := p.bitFileType(part, fld.BitFieldBlockWidth())
|
||||
p.w("*(*%s)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)) |= ", p.typ(part, bft), part.Offset-off)
|
||||
p.assignmentExpression(f, part.AssignmentExpression, bft, exprValue, fOutermost)
|
||||
p.assignmentExpression(f, part.AssignmentExpression, bft, exprValue, 0)
|
||||
p.w("&%#x", uint64(1)<<uint64(fld.BitFieldWidth())-1)
|
||||
if o := fld.BitFieldOffset(); o != 0 {
|
||||
p.w("<<%d", o)
|
||||
}
|
||||
default:
|
||||
p.w("*(*%s)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)) = ", p.typ(part, ft), part.Offset-off)
|
||||
p.assignmentExpression(f, part.AssignmentExpression, ft, exprValue, fOutermost)
|
||||
p.assignmentExpression(f, part.AssignmentExpression, ft, exprValue, 0)
|
||||
}
|
||||
p.w("\n")
|
||||
}
|
||||
|
2
vendor/modernc.org/libc/Makefile
generated
vendored
2
vendor/modernc.org/libc/Makefile
generated
vendored
@ -97,7 +97,7 @@ windows_386:
|
||||
CCGO_CPP=i686-w64-mingw32-cpp TARGET_GOOS=windows TARGET_GOARCH=386 go generate
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
|
||||
all_targets: linux_amd64 linux_386 linux_arm linux_arm64 windows_amd64 windows_386
|
||||
all_targets: linux_amd64 linux_386 linux_arm linux_arm64 linux_s390x # windows_amd64 windows_386
|
||||
echo done
|
||||
|
||||
build_all_targets:
|
||||
|
17
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
17
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
@ -25,6 +25,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -73,7 +74,7 @@
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite4_log": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_fd_clr": {},
|
||||
@ -106,6 +107,7 @@
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__mb_cur_max": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
@ -115,7 +117,6 @@
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
@ -142,6 +143,7 @@
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -169,7 +171,7 @@
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup3": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
@ -217,6 +219,7 @@
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getattrlist": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getentropy": {},
|
||||
@ -236,7 +239,9 @@
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrusage": {},
|
||||
@ -256,6 +261,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -263,6 +269,7 @@
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"issetugid": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"iswalnum": {},
|
||||
@ -312,6 +319,7 @@
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
@ -375,6 +383,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
@ -462,6 +471,7 @@
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
@ -477,5 +487,6 @@
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
||||
|
958
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
958
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
@ -3,474 +3,492 @@
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__assert_rtn": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_copysignl": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nan": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_nanl": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_popcountl": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_dmesg": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inline_isnand": {},
|
||||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_setjmp": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copyfile": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"flock": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fsctl": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fstatfs": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"futimes": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getattrlist": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getentropy": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"gethostuuid": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwuid": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"iswalnum": {},
|
||||
"iswspace": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"longjmp": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"mach_absolute_time": {},
|
||||
"mach_timebase_info": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"pread": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_destroy": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_init": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_attr_setscope": {},
|
||||
"pthread_attr_setstacksize": {},
|
||||
"pthread_cond_broadcast": {},
|
||||
"pthread_cond_destroy": {},
|
||||
"pthread_cond_init": {},
|
||||
"pthread_cond_signal": {},
|
||||
"pthread_cond_timedwait": {},
|
||||
"pthread_cond_wait": {},
|
||||
"pthread_create": {},
|
||||
"pthread_detach": {},
|
||||
"pthread_equal": {},
|
||||
"pthread_exit": {},
|
||||
"pthread_getspecific": {},
|
||||
"pthread_join": {},
|
||||
"pthread_key_create": {},
|
||||
"pthread_key_delete": {},
|
||||
"pthread_mutex_destroy": {},
|
||||
"pthread_mutex_init": {},
|
||||
"pthread_mutex_lock": {},
|
||||
"pthread_mutex_trylock": {},
|
||||
"pthread_mutex_unlock": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"pthread_self": {},
|
||||
"pthread_setspecific": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"pwrite": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"reallocarray": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setattrlist": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setjmp": {},
|
||||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"srandomdev": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"statfs": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"truncate": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"zero_struct_address": {},
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__assert_rtn": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_copysignl": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nan": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_nanl": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_popcountl": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_dmesg": {},
|
||||
"__ccgo_getMutexType": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inline_isnand": {},
|
||||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__mb_cur_max": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_setjmp": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"arc4random_buf": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copyfile": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"flock": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fsctl": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fstatfs": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"futimes": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getattrlist": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getentropy": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"gethostuuid": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"issetugid": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"iswalnum": {},
|
||||
"iswspace": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"longjmp": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"mach_absolute_time": {},
|
||||
"mach_timebase_info": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"pread": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_destroy": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_init": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_attr_setscope": {},
|
||||
"pthread_attr_setstacksize": {},
|
||||
"pthread_cond_broadcast": {},
|
||||
"pthread_cond_destroy": {},
|
||||
"pthread_cond_init": {},
|
||||
"pthread_cond_signal": {},
|
||||
"pthread_cond_timedwait": {},
|
||||
"pthread_cond_wait": {},
|
||||
"pthread_create": {},
|
||||
"pthread_detach": {},
|
||||
"pthread_equal": {},
|
||||
"pthread_exit": {},
|
||||
"pthread_getspecific": {},
|
||||
"pthread_join": {},
|
||||
"pthread_key_create": {},
|
||||
"pthread_key_delete": {},
|
||||
"pthread_mutex_destroy": {},
|
||||
"pthread_mutex_init": {},
|
||||
"pthread_mutex_lock": {},
|
||||
"pthread_mutex_trylock": {},
|
||||
"pthread_mutex_unlock": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"pthread_self": {},
|
||||
"pthread_setspecific": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"pwrite": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"reallocarray": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"sched_yield": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setattrlist": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setjmp": {},
|
||||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"srandomdev": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"statfs": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"truncate": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
||||
|
5
vendor/modernc.org/libc/capi_freebsd_amd64.go
generated
vendored
5
vendor/modernc.org/libc/capi_freebsd_amd64.go
generated
vendored
@ -28,6 +28,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -107,7 +108,6 @@
|
||||
"__swbuf": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -139,6 +139,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -260,6 +261,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"isnan": {},
|
||||
@ -368,6 +370,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
5
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
5
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
@ -23,6 +23,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -104,7 +105,6 @@
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -136,6 +136,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -261,6 +262,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -384,6 +386,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
5
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
5
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
@ -23,6 +23,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -104,7 +105,6 @@
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -136,6 +136,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -261,6 +262,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -386,6 +388,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
5
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
5
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
@ -23,6 +23,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -104,7 +105,6 @@
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -136,6 +136,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -261,6 +262,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -384,6 +386,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
5
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
5
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
@ -23,6 +23,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -104,7 +105,6 @@
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -136,6 +136,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -261,6 +262,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -384,6 +386,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
5
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
5
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
@ -23,6 +23,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -104,7 +105,6 @@
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
@ -136,6 +136,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -261,6 +262,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -384,6 +386,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
4
vendor/modernc.org/libc/capi_netbsd_amd64.go
generated
vendored
4
vendor/modernc.org/libc/capi_netbsd_amd64.go
generated
vendored
@ -28,6 +28,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -144,6 +145,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -265,6 +267,7 @@
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"isnan": {},
|
||||
@ -373,6 +376,7 @@
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
11
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
11
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
@ -72,6 +72,7 @@
|
||||
"GetCommModemStatus": {},
|
||||
"GetCommState": {},
|
||||
"GetCommandLineW": {},
|
||||
"GetComputerNameExW": {},
|
||||
"GetComputerNameW": {},
|
||||
"GetConsoleCP": {},
|
||||
"GetConsoleMode": {},
|
||||
@ -272,6 +273,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -327,6 +329,7 @@
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__imp__environ": {},
|
||||
"__imp__wenviron": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
@ -359,7 +362,6 @@
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"_access": {},
|
||||
"_assert": {},
|
||||
"_beginthread": {},
|
||||
@ -370,6 +372,7 @@
|
||||
"_chsize": {},
|
||||
"_commit": {},
|
||||
"_controlfp": {},
|
||||
"_copysign": {},
|
||||
"_endthreadex": {},
|
||||
"_errno": {},
|
||||
"_exit": {},
|
||||
@ -413,7 +416,10 @@
|
||||
"_vsnwprintf": {},
|
||||
"_wcsicmp": {},
|
||||
"_wcsnicmp": {},
|
||||
"_wgetenv": {},
|
||||
"_wopen": {},
|
||||
"_wputenv": {},
|
||||
"_wtoi": {},
|
||||
"_wunlink": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
@ -434,6 +440,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -526,6 +533,7 @@
|
||||
"ioctlsocket": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -603,6 +611,7 @@
|
||||
"recv": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
11
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
11
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
@ -72,6 +72,7 @@
|
||||
"GetCommModemStatus": {},
|
||||
"GetCommState": {},
|
||||
"GetCommandLineW": {},
|
||||
"GetComputerNameExW": {},
|
||||
"GetComputerNameW": {},
|
||||
"GetConsoleCP": {},
|
||||
"GetConsoleMode": {},
|
||||
@ -270,6 +271,7 @@
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
@ -325,6 +327,7 @@
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__imp__environ": {},
|
||||
"__imp__wenviron": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
@ -357,7 +360,6 @@
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"_access": {},
|
||||
"_assert": {},
|
||||
"_beginthread": {},
|
||||
@ -368,6 +370,7 @@
|
||||
"_chsize": {},
|
||||
"_commit": {},
|
||||
"_controlfp": {},
|
||||
"_copysign": {},
|
||||
"_endthreadex": {},
|
||||
"_errno": {},
|
||||
"_exit": {},
|
||||
@ -409,7 +412,10 @@
|
||||
"_vsnwprintf": {},
|
||||
"_wcsicmp": {},
|
||||
"_wcsnicmp": {},
|
||||
"_wgetenv": {},
|
||||
"_wopen": {},
|
||||
"_wputenv": {},
|
||||
"_wtoi": {},
|
||||
"_wunlink": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
@ -430,6 +436,7 @@
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
@ -522,6 +529,7 @@
|
||||
"ioctlsocket": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
@ -599,6 +607,7 @@
|
||||
"recv": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
|
64
vendor/modernc.org/libc/ccgo.go
generated
vendored
64
vendor/modernc.org/libc/ccgo.go
generated
vendored
@ -1273,7 +1273,7 @@ func AssignBitFieldPtr64Uint64(p uintptr, v uint64, w, off int, mask uint64) uin
|
||||
func PostDecBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ func PostDecBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8)
|
||||
func PostDecBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int16) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1289,7 +1289,7 @@ func PostDecBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int
|
||||
func PostDecBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int32) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1297,7 +1297,7 @@ func PostDecBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int
|
||||
func PostDecBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int64) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1305,7 +1305,7 @@ func PostDecBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int
|
||||
func PostDecBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int8) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ func PostDecBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int
|
||||
func PostDecBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r int16) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1321,7 +1321,7 @@ func PostDecBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r i
|
||||
func PostDecBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r int32) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1329,7 +1329,7 @@ func PostDecBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r i
|
||||
func PostDecBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r int64) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1337,7 +1337,7 @@ func PostDecBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r i
|
||||
func PostDecBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int8) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1345,7 +1345,7 @@ func PostDecBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int
|
||||
func PostDecBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r int16) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1353,7 +1353,7 @@ func PostDecBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r i
|
||||
func PostDecBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r int32) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1361,7 +1361,7 @@ func PostDecBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r i
|
||||
func PostDecBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r int64) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1369,7 +1369,7 @@ func PostDecBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r i
|
||||
func PostDecBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int8) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1377,7 +1377,7 @@ func PostDecBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int
|
||||
func PostDecBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r int16) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1385,7 +1385,7 @@ func PostDecBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r i
|
||||
func PostDecBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r int32) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1393,7 +1393,7 @@ func PostDecBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r i
|
||||
func PostDecBitFieldPtr64Int64(p uintptr, d int64, w, off int, mask uint64) (r int64) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r-d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1513,7 +1513,7 @@ func PostDecBitFieldPtr64Uint64(p uintptr, d uint64, w, off int, mask uint64) (r
|
||||
func PostIncBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1521,7 +1521,7 @@ func PostIncBitFieldPtr8Int8(p uintptr, d int8, w, off int, mask uint8) (r int8)
|
||||
func PostIncBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int16) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1529,7 +1529,7 @@ func PostIncBitFieldPtr8Int16(p uintptr, d int16, w, off int, mask uint8) (r int
|
||||
func PostIncBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int32) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1537,7 +1537,7 @@ func PostIncBitFieldPtr8Int32(p uintptr, d int32, w, off int, mask uint8) (r int
|
||||
func PostIncBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int64) {
|
||||
x0 := *(*uint8)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint8)(unsafe.Pointer(p)) = x0&^uint8(mask) | uint8(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1545,7 +1545,7 @@ func PostIncBitFieldPtr8Int64(p uintptr, d int64, w, off int, mask uint8) (r int
|
||||
func PostIncBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int8) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1553,7 +1553,7 @@ func PostIncBitFieldPtr16Int8(p uintptr, d int8, w, off int, mask uint16) (r int
|
||||
func PostIncBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r int16) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1561,7 +1561,7 @@ func PostIncBitFieldPtr16Int16(p uintptr, d int16, w, off int, mask uint16) (r i
|
||||
func PostIncBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r int32) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1569,7 +1569,7 @@ func PostIncBitFieldPtr16Int32(p uintptr, d int32, w, off int, mask uint16) (r i
|
||||
func PostIncBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r int64) {
|
||||
x0 := *(*uint16)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint16)(unsafe.Pointer(p)) = x0&^uint16(mask) | uint16(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1577,7 +1577,7 @@ func PostIncBitFieldPtr16Int64(p uintptr, d int64, w, off int, mask uint16) (r i
|
||||
func PostIncBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int8) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1585,7 +1585,7 @@ func PostIncBitFieldPtr32Int8(p uintptr, d int8, w, off int, mask uint32) (r int
|
||||
func PostIncBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r int16) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1593,7 +1593,7 @@ func PostIncBitFieldPtr32Int16(p uintptr, d int16, w, off int, mask uint32) (r i
|
||||
func PostIncBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r int32) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1601,7 +1601,7 @@ func PostIncBitFieldPtr32Int32(p uintptr, d int32, w, off int, mask uint32) (r i
|
||||
func PostIncBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r int64) {
|
||||
x0 := *(*uint32)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint32)(unsafe.Pointer(p)) = x0&^uint32(mask) | uint32(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1609,7 +1609,7 @@ func PostIncBitFieldPtr32Int64(p uintptr, d int64, w, off int, mask uint32) (r i
|
||||
func PostIncBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int8) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 8 - w
|
||||
r = int8(x0) & int8(mask) << s >> s
|
||||
r = int8(x0) & int8(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1617,7 +1617,7 @@ func PostIncBitFieldPtr64Int8(p uintptr, d int8, w, off int, mask uint64) (r int
|
||||
func PostIncBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r int16) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 16 - w
|
||||
r = int16(x0) & int16(mask) << s >> s
|
||||
r = int16(x0) & int16(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1625,7 +1625,7 @@ func PostIncBitFieldPtr64Int16(p uintptr, d int16, w, off int, mask uint64) (r i
|
||||
func PostIncBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r int32) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 32 - w
|
||||
r = int32(x0) & int32(mask) << s >> s
|
||||
r = int32(x0) & int32(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
@ -1633,7 +1633,7 @@ func PostIncBitFieldPtr64Int32(p uintptr, d int32, w, off int, mask uint64) (r i
|
||||
func PostIncBitFieldPtr64Int64(p uintptr, d int64, w, off int, mask uint64) (r int64) {
|
||||
x0 := *(*uint64)(unsafe.Pointer(p))
|
||||
s := 64 - w
|
||||
r = int64(x0) & int64(mask) << s >> s
|
||||
r = int64(x0) & int64(mask) << s >> (s + off)
|
||||
*(*uint64)(unsafe.Pointer(p)) = x0&^uint64(mask) | uint64(r+d)<<off&mask
|
||||
return r
|
||||
}
|
||||
|
6
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
6
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
@ -314,6 +314,12 @@ type X__uint128_t = struct {
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
// __stateful_pure can be used for functions that have no side effects,
|
||||
// but depend on the state of the memory.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
127
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
127
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
@ -101,6 +101,7 @@
|
||||
LOCK_SH = 0x01
|
||||
LOCK_UN = 0x08
|
||||
MAC_OS_VERSION_11_0 = 110000
|
||||
MAC_OS_VERSION_12_0 = 120000
|
||||
MAC_OS_X_VERSION_10_0 = 1000
|
||||
MAC_OS_X_VERSION_10_1 = 1010
|
||||
MAC_OS_X_VERSION_10_10 = 101000
|
||||
@ -194,6 +195,7 @@
|
||||
S_IXOTH = 0000001
|
||||
S_IXUSR = 0000100
|
||||
USER_FSIGNATURES_CDHASH_LEN = 20
|
||||
X_ARM_MACHTYPES_H_ = 0
|
||||
X_BSD_ARM__TYPES_H_ = 0
|
||||
X_BSD_MACHINE_TYPES_H_ = 0
|
||||
X_BSD_MACHINE__TYPES_H_ = 0
|
||||
@ -229,7 +231,7 @@
|
||||
X_U_INT8_T = 0
|
||||
)
|
||||
|
||||
const ( /* fcntl.h:536:1: */
|
||||
const ( /* fcntl.h:545:1: */
|
||||
FILESEC_OWNER = 1
|
||||
FILESEC_GROUP = 2
|
||||
FILESEC_UUID = 3
|
||||
@ -448,6 +450,12 @@ type X__uint128_t = struct {
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
// __stateful_pure can be used for functions that have no side effects,
|
||||
// but depend on the state of the memory.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
@ -762,17 +770,17 @@ type X__uint128_t = struct {
|
||||
// This header file contains integer types. It's intended to also contain
|
||||
// flotaing point and other arithmetic types, as needed, later.
|
||||
|
||||
type X__int8_t = int8 /* _types.h:13:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:17:33 */
|
||||
type X__int16_t = int16 /* _types.h:18:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:19:33 */
|
||||
type X__int32_t = int32 /* _types.h:20:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:21:33 */
|
||||
type X__int64_t = int64 /* _types.h:22:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:23:33 */
|
||||
type X__int8_t = int8 /* _types.h:15:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:19:33 */
|
||||
type X__int16_t = int16 /* _types.h:20:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:21:33 */
|
||||
type X__int32_t = int32 /* _types.h:22:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:23:33 */
|
||||
type X__int64_t = int64 /* _types.h:24:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:25:33 */
|
||||
|
||||
type X__darwin_intptr_t = int64 /* _types.h:25:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:26:33 */
|
||||
type X__darwin_intptr_t = int64 /* _types.h:27:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:28:33 */
|
||||
|
||||
// The rune type below is declared to be an ``int'' instead of the more natural
|
||||
// ``unsigned long'' or ``long''. Two things are happening here. It is not
|
||||
@ -790,33 +798,33 @@ type X__uint128_t = struct {
|
||||
// wchar_t, and should also be able to hold all members of the largest
|
||||
// character set plus one extra value (WEOF). wint_t must be at least 16 bits.
|
||||
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:46:33 */ // ct_rune_t
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
_ [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:55:3 */
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:57:3 */
|
||||
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:57:33 */ // mbstate_t
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
|
||||
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:60:33 */ // ptr1 - ptr2
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
|
||||
|
||||
type X__darwin_size_t = uint64 /* _types.h:68:33 */ // sizeof()
|
||||
type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
|
||||
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:74:33 */ // va_list
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
|
||||
|
||||
type X__darwin_wchar_t = int32 /* _types.h:80:33 */ // wchar_t
|
||||
type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
|
||||
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:85:33 */ // rune_t
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
|
||||
|
||||
type X__darwin_wint_t = int32 /* _types.h:88:33 */ // wint_t
|
||||
type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
|
||||
|
||||
type X__darwin_clock_t = uint64 /* _types.h:93:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:94:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:95:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:96:33 */ // time()
|
||||
type X__darwin_clock_t = uint64 /* _types.h:95:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:97:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:98:33 */ // time()
|
||||
|
||||
// Type definitions; takes common type definitions that must be used
|
||||
// in multiple header files due to [XSI], removes them from the system
|
||||
@ -1391,7 +1399,7 @@ type Flock = struct {
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:350:1 */
|
||||
} /* fcntl.h:359:1 */
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
@ -1756,7 +1764,7 @@ type Flock = struct {
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type U_int64_t = uint64 /* _u_int64_t.h:30:33 */
|
||||
|
||||
type Register_t = Int64_t /* types.h:63:33 */
|
||||
type Register_t = Int64_t /* types.h:66:33 */
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
@ -1836,19 +1844,20 @@ type Flock = struct {
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type Uintptr_t = uint64 /* _uintptr_t.h:30:33 */
|
||||
|
||||
type Uintptr_t = uint64 /* _uintptr_t.h:34:33 */
|
||||
|
||||
// These types are used for reserving the largest possible size.
|
||||
type User_addr_t = U_int64_t /* types.h:74:33 */
|
||||
type User_size_t = U_int64_t /* types.h:75:33 */
|
||||
type User_ssize_t = Int64_t /* types.h:76:33 */
|
||||
type User_long_t = Int64_t /* types.h:77:33 */
|
||||
type User_ulong_t = U_int64_t /* types.h:78:33 */
|
||||
type User_time_t = Int64_t /* types.h:79:33 */
|
||||
type User_off_t = Int64_t /* types.h:80:33 */
|
||||
type User_addr_t = U_int64_t /* types.h:77:33 */
|
||||
type User_size_t = U_int64_t /* types.h:78:33 */
|
||||
type User_ssize_t = Int64_t /* types.h:79:33 */
|
||||
type User_long_t = Int64_t /* types.h:80:33 */
|
||||
type User_ulong_t = U_int64_t /* types.h:81:33 */
|
||||
type User_time_t = Int64_t /* types.h:82:33 */
|
||||
type User_off_t = Int64_t /* types.h:83:33 */
|
||||
|
||||
// This defines the size of syscall arguments after copying into the kernel:
|
||||
type Syscall_arg_t = U_int64_t /* types.h:101:33 */
|
||||
type Syscall_arg_t = U_int64_t /* types.h:104:33 */
|
||||
|
||||
type Timespec = struct {
|
||||
Ftv_sec X__darwin_time_t
|
||||
@ -1869,7 +1878,7 @@ type Flocktimeout = struct {
|
||||
Ftv_sec X__darwin_time_t
|
||||
Ftv_nsec int64
|
||||
}
|
||||
} /* fcntl.h:365:1 */
|
||||
} /* fcntl.h:374:1 */
|
||||
|
||||
// advisory file read data type -
|
||||
// information passed by user to system
|
||||
@ -1878,7 +1887,7 @@ type Radvisory = struct {
|
||||
Fra_offset Off_t
|
||||
Fra_count int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* fcntl.h:378:1 */
|
||||
} /* fcntl.h:387:1 */
|
||||
|
||||
// detached code signatures data type -
|
||||
// information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
|
||||
@ -1891,13 +1900,13 @@ type Fsignatures = struct {
|
||||
Ffs_fsignatures_size Size_t
|
||||
Ffs_cdhash [20]int8
|
||||
Ffs_hash_type int32
|
||||
} /* fcntl.h:391:9 */
|
||||
} /* fcntl.h:400:9 */
|
||||
|
||||
// detached code signatures data type -
|
||||
// information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
|
||||
// F_ADDFILESIGS is a shortcut for files that contain their own signature and
|
||||
// doesn't require mapping of the file in order to load the signature.
|
||||
type Fsignatures_t = Fsignatures /* fcntl.h:401:3 */
|
||||
type Fsignatures_t = Fsignatures /* fcntl.h:410:3 */
|
||||
|
||||
type Fsupplement = struct {
|
||||
Ffs_file_start Off_t
|
||||
@ -1905,9 +1914,9 @@ type Fsupplement = struct {
|
||||
Ffs_blob_size Size_t
|
||||
Ffs_orig_fd int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* fcntl.h:403:9 */
|
||||
} /* fcntl.h:412:9 */
|
||||
|
||||
type Fsupplement_t = Fsupplement /* fcntl.h:408:3 */
|
||||
type Fsupplement_t = Fsupplement /* fcntl.h:417:3 */
|
||||
|
||||
// DYLD needs to check if the object is allowed to be combined
|
||||
// into the main binary. This is done between the code signature
|
||||
@ -1921,7 +1930,7 @@ type Fchecklv = struct {
|
||||
Flv_file_start Off_t
|
||||
Flv_error_message_size Size_t
|
||||
Flv_error_message uintptr
|
||||
} /* fcntl.h:422:9 */
|
||||
} /* fcntl.h:431:9 */
|
||||
|
||||
// DYLD needs to check if the object is allowed to be combined
|
||||
// into the main binary. This is done between the code signature
|
||||
@ -1931,7 +1940,7 @@ type Fchecklv = struct {
|
||||
// the MAC module doesn't say no when LV isn't enabled and then that
|
||||
// is cached on the vnode, and the MAC module never gets change once
|
||||
// a process that library validation enabled.
|
||||
type Fchecklv_t = Fchecklv /* fcntl.h:426:3 */
|
||||
type Fchecklv_t = Fchecklv /* fcntl.h:435:3 */
|
||||
|
||||
// At this time F_GETSIGSINFO can only indicate platformness.
|
||||
// As additional requestable information is defined, new keys will be added and the
|
||||
@ -1942,14 +1951,14 @@ type Fgetsigsinfo = struct {
|
||||
Ffg_file_start Off_t
|
||||
Ffg_info_request int32
|
||||
Ffg_sig_is_platform int32
|
||||
} /* fcntl.h:436:9 */
|
||||
} /* fcntl.h:445:9 */
|
||||
|
||||
// At this time F_GETSIGSINFO can only indicate platformness.
|
||||
// As additional requestable information is defined, new keys will be added and the
|
||||
// fgetsigsinfo_t structure will be lengthened to add space for the additional information
|
||||
|
||||
// fgetsigsinfo_t used by F_GETSIGSINFO command
|
||||
type Fgetsigsinfo_t = Fgetsigsinfo /* fcntl.h:440:3 */
|
||||
type Fgetsigsinfo_t = Fgetsigsinfo /* fcntl.h:449:3 */
|
||||
|
||||
// lock operations for flock(2)
|
||||
|
||||
@ -1961,13 +1970,13 @@ type Fstore = struct {
|
||||
Ffst_offset Off_t
|
||||
Ffst_length Off_t
|
||||
Ffst_bytesalloc Off_t
|
||||
} /* fcntl.h:451:9 */
|
||||
} /* fcntl.h:460:9 */
|
||||
|
||||
// lock operations for flock(2)
|
||||
|
||||
// fstore_t type used by F_PREALLOCATE command
|
||||
|
||||
type Fstore_t = Fstore /* fcntl.h:457:3 */
|
||||
type Fstore_t = Fstore /* fcntl.h:466:3 */
|
||||
|
||||
// fpunchhole_t used by F_PUNCHHOLE
|
||||
type Fpunchhole = struct {
|
||||
@ -1975,19 +1984,19 @@ type Fpunchhole = struct {
|
||||
Freserved uint32
|
||||
Ffp_offset Off_t
|
||||
Ffp_length Off_t
|
||||
} /* fcntl.h:460:9 */
|
||||
} /* fcntl.h:469:9 */
|
||||
|
||||
// fpunchhole_t used by F_PUNCHHOLE
|
||||
type Fpunchhole_t = Fpunchhole /* fcntl.h:465:3 */
|
||||
type Fpunchhole_t = Fpunchhole /* fcntl.h:474:3 */
|
||||
|
||||
// factive_file_trim_t used by F_TRIM_ACTIVE_FILE
|
||||
type Ftrimactivefile = struct {
|
||||
Ffta_offset Off_t
|
||||
Ffta_length Off_t
|
||||
} /* fcntl.h:468:9 */
|
||||
} /* fcntl.h:477:9 */
|
||||
|
||||
// factive_file_trim_t used by F_TRIM_ACTIVE_FILE
|
||||
type Ftrimactivefile_t = Ftrimactivefile /* fcntl.h:471:3 */
|
||||
type Ftrimactivefile_t = Ftrimactivefile /* fcntl.h:480:3 */
|
||||
|
||||
// fspecread_t used by F_SPECULATIVE_READ
|
||||
type Fspecread = struct {
|
||||
@ -1995,10 +2004,10 @@ type Fspecread = struct {
|
||||
Freserved uint32
|
||||
Ffsr_offset Off_t
|
||||
Ffsr_length Off_t
|
||||
} /* fcntl.h:474:9 */
|
||||
} /* fcntl.h:483:9 */
|
||||
|
||||
// fspecread_t used by F_SPECULATIVE_READ
|
||||
type Fspecread_t = Fspecread /* fcntl.h:479:3 */
|
||||
type Fspecread_t = Fspecread /* fcntl.h:488:3 */
|
||||
|
||||
// fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
|
||||
|
||||
@ -2006,11 +2015,11 @@ type Fbootstraptransfer = struct {
|
||||
Ffbt_offset Off_t
|
||||
Ffbt_length Size_t
|
||||
Ffbt_buffer uintptr
|
||||
} /* fcntl.h:483:9 */
|
||||
} /* fcntl.h:492:9 */
|
||||
|
||||
// fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
|
||||
|
||||
type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:487:3 */
|
||||
type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:496:3 */
|
||||
|
||||
// For F_LOG2PHYS this information is passed back to user
|
||||
// Currently only devoffset is returned - that is the VOP_BMAP
|
||||
@ -2037,10 +2046,10 @@ type Log2phys = struct {
|
||||
F__ccgo_pad1 [4]byte
|
||||
Fl2p_contigbytes Off_t
|
||||
Fl2p_devoffset Off_t
|
||||
} /* fcntl.h:513:1 */
|
||||
} /* fcntl.h:522:1 */
|
||||
|
||||
type Filesec_t = uintptr /* _filesec_t.h:31:25 */
|
||||
|
||||
type Filesec_property_t = uint32 /* fcntl.h:547:3 */
|
||||
type Filesec_property_t = uint32 /* fcntl.h:556:3 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
|
85
vendor/modernc.org/libc/fts/fts_darwin_arm64.go
generated
vendored
85
vendor/modernc.org/libc/fts/fts_darwin_arm64.go
generated
vendored
@ -95,6 +95,7 @@
|
||||
INT_LEAST8_MIN = -128
|
||||
LITTLE_ENDIAN = 1234
|
||||
MAC_OS_VERSION_11_0 = 110000
|
||||
MAC_OS_VERSION_12_0 = 120000
|
||||
MAC_OS_X_VERSION_10_0 = 1000
|
||||
MAC_OS_X_VERSION_10_1 = 1010
|
||||
MAC_OS_X_VERSION_10_10 = 101000
|
||||
@ -204,6 +205,7 @@
|
||||
WINT_MAX = 2147483647
|
||||
WINT_MIN = -2147483648
|
||||
X_ARM_ARCH_H = 0
|
||||
X_ARM_MACHTYPES_H_ = 0
|
||||
X_ARM__ENDIAN_H_ = 0
|
||||
X_BLKCNT_T = 0
|
||||
X_BLKSIZE_T = 0
|
||||
@ -475,6 +477,12 @@ type X__uint128_t = struct {
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
// __stateful_pure can be used for functions that have no side effects,
|
||||
// but depend on the state of the memory.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
@ -826,17 +834,17 @@ type X__uint128_t = struct {
|
||||
// This header file contains integer types. It's intended to also contain
|
||||
// flotaing point and other arithmetic types, as needed, later.
|
||||
|
||||
type X__int8_t = int8 /* _types.h:13:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:17:33 */
|
||||
type X__int16_t = int16 /* _types.h:18:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:19:33 */
|
||||
type X__int32_t = int32 /* _types.h:20:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:21:33 */
|
||||
type X__int64_t = int64 /* _types.h:22:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:23:33 */
|
||||
type X__int8_t = int8 /* _types.h:15:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:19:33 */
|
||||
type X__int16_t = int16 /* _types.h:20:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:21:33 */
|
||||
type X__int32_t = int32 /* _types.h:22:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:23:33 */
|
||||
type X__int64_t = int64 /* _types.h:24:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:25:33 */
|
||||
|
||||
type X__darwin_intptr_t = int64 /* _types.h:25:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:26:33 */
|
||||
type X__darwin_intptr_t = int64 /* _types.h:27:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:28:33 */
|
||||
|
||||
// The rune type below is declared to be an ``int'' instead of the more natural
|
||||
// ``unsigned long'' or ``long''. Two things are happening here. It is not
|
||||
@ -854,33 +862,33 @@ type X__uint128_t = struct {
|
||||
// wchar_t, and should also be able to hold all members of the largest
|
||||
// character set plus one extra value (WEOF). wint_t must be at least 16 bits.
|
||||
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:46:33 */ // ct_rune_t
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
_ [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:55:3 */
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:57:3 */
|
||||
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:57:33 */ // mbstate_t
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
|
||||
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:60:33 */ // ptr1 - ptr2
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
|
||||
|
||||
type X__darwin_size_t = uint64 /* _types.h:68:33 */ // sizeof()
|
||||
type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
|
||||
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:74:33 */ // va_list
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
|
||||
|
||||
type X__darwin_wchar_t = int32 /* _types.h:80:33 */ // wchar_t
|
||||
type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
|
||||
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:85:33 */ // rune_t
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
|
||||
|
||||
type X__darwin_wint_t = int32 /* _types.h:88:33 */ // wint_t
|
||||
type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
|
||||
|
||||
type X__darwin_clock_t = uint64 /* _types.h:93:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:94:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:95:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:96:33 */ // time()
|
||||
type X__darwin_clock_t = uint64 /* _types.h:95:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:97:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:98:33 */ // time()
|
||||
|
||||
// Copyright (c) 2000-2018 Apple Inc. All rights reserved.
|
||||
//
|
||||
@ -1156,7 +1164,7 @@ type X__mbstate_t = struct {
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type U_int64_t = uint64 /* _u_int64_t.h:30:33 */
|
||||
|
||||
type Register_t = Int64_t /* types.h:63:33 */
|
||||
type Register_t = Int64_t /* types.h:66:33 */
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
@ -1236,19 +1244,20 @@ type X__mbstate_t = struct {
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type Uintptr_t = uint64 /* _uintptr_t.h:30:33 */
|
||||
|
||||
type Uintptr_t = uint64 /* _uintptr_t.h:34:33 */
|
||||
|
||||
// These types are used for reserving the largest possible size.
|
||||
type User_addr_t = U_int64_t /* types.h:74:33 */
|
||||
type User_size_t = U_int64_t /* types.h:75:33 */
|
||||
type User_ssize_t = Int64_t /* types.h:76:33 */
|
||||
type User_long_t = Int64_t /* types.h:77:33 */
|
||||
type User_ulong_t = U_int64_t /* types.h:78:33 */
|
||||
type User_time_t = Int64_t /* types.h:79:33 */
|
||||
type User_off_t = Int64_t /* types.h:80:33 */
|
||||
type User_addr_t = U_int64_t /* types.h:77:33 */
|
||||
type User_size_t = U_int64_t /* types.h:78:33 */
|
||||
type User_ssize_t = Int64_t /* types.h:79:33 */
|
||||
type User_long_t = Int64_t /* types.h:80:33 */
|
||||
type User_ulong_t = U_int64_t /* types.h:81:33 */
|
||||
type User_time_t = Int64_t /* types.h:82:33 */
|
||||
type User_off_t = Int64_t /* types.h:83:33 */
|
||||
|
||||
// This defines the size of syscall arguments after copying into the kernel:
|
||||
type Syscall_arg_t = U_int64_t /* types.h:101:33 */
|
||||
type Syscall_arg_t = U_int64_t /* types.h:104:33 */
|
||||
|
||||
// Copyright (c) 2003-2007 Apple Inc. All rights reserved.
|
||||
//
|
||||
@ -1889,7 +1898,7 @@ type X_opaque_pthread_t = struct {
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdint.h"
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdint.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
@ -3730,7 +3739,7 @@ type X_OSUnalignedU64 = struct{
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternal.h"
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
@ -4032,7 +4041,7 @@ type Fd_set1 = struct{
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternal.h"
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
56
vendor/modernc.org/libc/grp/grp_darwin_arm64.go
generated
vendored
56
vendor/modernc.org/libc/grp/grp_darwin_arm64.go
generated
vendored
@ -219,6 +219,12 @@ type X__uint128_t = struct {
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
// __stateful_pure can be used for functions that have no side effects,
|
||||
// but depend on the state of the memory.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
@ -533,17 +539,17 @@ type X__uint128_t = struct {
|
||||
// This header file contains integer types. It's intended to also contain
|
||||
// flotaing point and other arithmetic types, as needed, later.
|
||||
|
||||
type X__int8_t = int8 /* _types.h:13:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:17:33 */
|
||||
type X__int16_t = int16 /* _types.h:18:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:19:33 */
|
||||
type X__int32_t = int32 /* _types.h:20:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:21:33 */
|
||||
type X__int64_t = int64 /* _types.h:22:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:23:33 */
|
||||
type X__int8_t = int8 /* _types.h:15:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:19:33 */
|
||||
type X__int16_t = int16 /* _types.h:20:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:21:33 */
|
||||
type X__int32_t = int32 /* _types.h:22:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:23:33 */
|
||||
type X__int64_t = int64 /* _types.h:24:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:25:33 */
|
||||
|
||||
type X__darwin_intptr_t = int64 /* _types.h:25:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:26:33 */
|
||||
type X__darwin_intptr_t = int64 /* _types.h:27:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:28:33 */
|
||||
|
||||
// The rune type below is declared to be an ``int'' instead of the more natural
|
||||
// ``unsigned long'' or ``long''. Two things are happening here. It is not
|
||||
@ -561,33 +567,33 @@ type X__uint128_t = struct {
|
||||
// wchar_t, and should also be able to hold all members of the largest
|
||||
// character set plus one extra value (WEOF). wint_t must be at least 16 bits.
|
||||
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:46:33 */ // ct_rune_t
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
_ [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:55:3 */
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:57:3 */
|
||||
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:57:33 */ // mbstate_t
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
|
||||
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:60:33 */ // ptr1 - ptr2
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
|
||||
|
||||
type X__darwin_size_t = uint64 /* _types.h:68:33 */ // sizeof()
|
||||
type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
|
||||
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:74:33 */ // va_list
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
|
||||
|
||||
type X__darwin_wchar_t = int32 /* _types.h:80:33 */ // wchar_t
|
||||
type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
|
||||
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:85:33 */ // rune_t
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
|
||||
|
||||
type X__darwin_wint_t = int32 /* _types.h:88:33 */ // wint_t
|
||||
type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
|
||||
|
||||
type X__darwin_clock_t = uint64 /* _types.h:93:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:94:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:95:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:96:33 */ // time()
|
||||
type X__darwin_clock_t = uint64 /* _types.h:95:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:97:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:98:33 */ // time()
|
||||
|
||||
// Type definitions; takes common type definitions that must be used
|
||||
// in multiple header files due to [XSI], removes them from the system
|
||||
|
56
vendor/modernc.org/libc/langinfo/langinfo_darwin_arm64.go
generated
vendored
56
vendor/modernc.org/libc/langinfo/langinfo_darwin_arm64.go
generated
vendored
@ -259,6 +259,12 @@ type X__uint128_t = struct {
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
// __stateful_pure can be used for functions that have no side effects,
|
||||
// but depend on the state of the memory.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
@ -573,17 +579,17 @@ type X__uint128_t = struct {
|
||||
// This header file contains integer types. It's intended to also contain
|
||||
// flotaing point and other arithmetic types, as needed, later.
|
||||
|
||||
type X__int8_t = int8 /* _types.h:13:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:17:33 */
|
||||
type X__int16_t = int16 /* _types.h:18:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:19:33 */
|
||||
type X__int32_t = int32 /* _types.h:20:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:21:33 */
|
||||
type X__int64_t = int64 /* _types.h:22:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:23:33 */
|
||||
type X__int8_t = int8 /* _types.h:15:33 */
|
||||
type X__uint8_t = uint8 /* _types.h:19:33 */
|
||||
type X__int16_t = int16 /* _types.h:20:33 */
|
||||
type X__uint16_t = uint16 /* _types.h:21:33 */
|
||||
type X__int32_t = int32 /* _types.h:22:33 */
|
||||
type X__uint32_t = uint32 /* _types.h:23:33 */
|
||||
type X__int64_t = int64 /* _types.h:24:33 */
|
||||
type X__uint64_t = uint64 /* _types.h:25:33 */
|
||||
|
||||
type X__darwin_intptr_t = int64 /* _types.h:25:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:26:33 */
|
||||
type X__darwin_intptr_t = int64 /* _types.h:27:33 */
|
||||
type X__darwin_natural_t = uint32 /* _types.h:28:33 */
|
||||
|
||||
// The rune type below is declared to be an ``int'' instead of the more natural
|
||||
// ``unsigned long'' or ``long''. Two things are happening here. It is not
|
||||
@ -601,33 +607,33 @@ type X__uint128_t = struct {
|
||||
// wchar_t, and should also be able to hold all members of the largest
|
||||
// character set plus one extra value (WEOF). wint_t must be at least 16 bits.
|
||||
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:46:33 */ // ct_rune_t
|
||||
type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
_ [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:55:3 */
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:57:3 */
|
||||
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:57:33 */ // mbstate_t
|
||||
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
|
||||
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:60:33 */ // ptr1 - ptr2
|
||||
type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
|
||||
|
||||
type X__darwin_size_t = uint64 /* _types.h:68:33 */ // sizeof()
|
||||
type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
|
||||
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:74:33 */ // va_list
|
||||
type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
|
||||
|
||||
type X__darwin_wchar_t = int32 /* _types.h:80:33 */ // wchar_t
|
||||
type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
|
||||
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:85:33 */ // rune_t
|
||||
type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
|
||||
|
||||
type X__darwin_wint_t = int32 /* _types.h:88:33 */ // wint_t
|
||||
type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
|
||||
|
||||
type X__darwin_clock_t = uint64 /* _types.h:93:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:94:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:95:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:96:33 */ // time()
|
||||
type X__darwin_clock_t = uint64 /* _types.h:95:33 */ // clock()
|
||||
type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
|
||||
type X__darwin_ssize_t = int64 /* _types.h:97:33 */ // byte count or error
|
||||
type X__darwin_time_t = int64 /* _types.h:98:33 */ // time()
|
||||
|
||||
// Type definitions; takes common type definitions that must be used
|
||||
// in multiple header files due to [XSI], removes them from the system
|
||||
|
44
vendor/modernc.org/libc/libc.go
generated
vendored
44
vendor/modernc.org/libc/libc.go
generated
vendored
@ -219,6 +219,7 @@ func write(b []byte) (int, error) {
|
||||
return len(b), nil
|
||||
}
|
||||
|
||||
func X__builtin_bzero(t *TLS, s uintptr, n types.Size_t) { Xbzero(t, s, n) }
|
||||
func X__builtin_abort(t *TLS) { Xabort(t) }
|
||||
func X__builtin_abs(t *TLS, j int32) int32 { return Xabs(t, j) }
|
||||
func X__builtin_clz(t *TLS, n uint32) int32 { return int32(mbits.LeadingZeros32(n)) }
|
||||
@ -949,7 +950,7 @@ func Xatol(t *TLS, nptr uintptr) long {
|
||||
}
|
||||
|
||||
// time_t mktime(struct tm *tm);
|
||||
func Xmktime(t *TLS, ptm uintptr) types.Time_t {
|
||||
func Xmktime(t *TLS, ptm uintptr) time.Time_t {
|
||||
loc := gotime.Local
|
||||
if r := getenv(Environ(), "TZ"); r != 0 {
|
||||
zone, off := parseZone(GoString(r))
|
||||
@ -967,7 +968,7 @@ func Xmktime(t *TLS, ptm uintptr) types.Time_t {
|
||||
)
|
||||
(*time.Tm)(unsafe.Pointer(ptm)).Ftm_wday = int32(tt.Weekday())
|
||||
(*time.Tm)(unsafe.Pointer(ptm)).Ftm_yday = int32(tt.YearDay() - 1)
|
||||
return types.Time_t(tt.Unix())
|
||||
return time.Time_t(tt.Unix())
|
||||
}
|
||||
|
||||
// char *strpbrk(const char *s, const char *accept);
|
||||
@ -1063,7 +1064,10 @@ func X_IO_putc(t *TLS, c int32, fp uintptr) int32 {
|
||||
|
||||
// int atexit(void (*function)(void));
|
||||
func Xatexit(t *TLS, function uintptr) int32 {
|
||||
panic(todo(""))
|
||||
AtExit(func() {
|
||||
(*struct{ f func(*TLS) })(unsafe.Pointer(&struct{ uintptr }{function})).f(t)
|
||||
})
|
||||
return 0
|
||||
}
|
||||
|
||||
// int vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
@ -1367,3 +1371,37 @@ func Xfgets(t *TLS, s uintptr, size int32, stream uintptr) uintptr {
|
||||
copy((*RawMem)(unsafe.Pointer(s))[:len(b):len(b)], b)
|
||||
return s
|
||||
}
|
||||
|
||||
// void bzero(void *s, size_t n);
|
||||
func Xbzero(t *TLS, s uintptr, n types.Size_t) {
|
||||
b := (*RawMem)(unsafe.Pointer(s))[:n]
|
||||
for i := range b {
|
||||
b[i] = 0
|
||||
}
|
||||
}
|
||||
|
||||
// char *rindex(const char *s, int c);
|
||||
func Xrindex(t *TLS, s uintptr, c int32) uintptr {
|
||||
if s == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var r uintptr
|
||||
for {
|
||||
c2 := int32(*(*byte)(unsafe.Pointer(s)))
|
||||
if c2 == c {
|
||||
r = s
|
||||
}
|
||||
|
||||
if c2 == 0 {
|
||||
return r
|
||||
}
|
||||
|
||||
s++
|
||||
}
|
||||
}
|
||||
|
||||
// int isascii(int c);
|
||||
func Xisascii(t *TLS, c int32) int32 {
|
||||
return Bool32(c >= 0 && c <= 0x7f)
|
||||
}
|
||||
|
4
vendor/modernc.org/libc/libc32.go
generated
vendored
4
vendor/modernc.org/libc/libc32.go
generated
vendored
@ -7,6 +7,10 @@
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
const (
|
||||
heapSize = 1 << 30 // Adjust for your debugging session requirements and system RAM size.
|
||||
)
|
||||
|
||||
type (
|
||||
// RawMem represents the biggest byte array the runtime can handle
|
||||
RawMem [1<<31 - 1]byte
|
||||
|
4
vendor/modernc.org/libc/libc64.go
generated
vendored
4
vendor/modernc.org/libc/libc64.go
generated
vendored
@ -7,6 +7,10 @@
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
const (
|
||||
heapSize = 2 << 30 // Adjust for your debugging session requirements and system RAM size.
|
||||
)
|
||||
|
||||
type (
|
||||
// RawMem represents the biggest byte array the runtime can handle
|
||||
RawMem [1<<50 - 1]byte
|
||||
|
626
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
626
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
@ -5,15 +5,14 @@
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
crand "crypto/rand"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
gosignal "os/signal"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
gotime "time"
|
||||
@ -29,7 +28,6 @@
|
||||
"modernc.org/libc/limits"
|
||||
"modernc.org/libc/netdb"
|
||||
"modernc.org/libc/netinet/in"
|
||||
"modernc.org/libc/pwd"
|
||||
"modernc.org/libc/signal"
|
||||
"modernc.org/libc/stdio"
|
||||
"modernc.org/libc/sys/socket"
|
||||
@ -59,6 +57,19 @@
|
||||
var X__stdinp = Xstdin
|
||||
var X__stdoutp = Xstdout
|
||||
|
||||
// user@darwin-m1:~/tmp$ cat main.c
|
||||
// #include <xlocale.h>
|
||||
// #include <stdio.h>
|
||||
//
|
||||
// int main() {
|
||||
// printf("%i\n", ___mb_cur_max());
|
||||
// return 0;
|
||||
// }
|
||||
// user@darwin-m1:~/tmp$ gcc main.c && ./a.out
|
||||
// 1
|
||||
// user@darwin-m1:~/tmp$
|
||||
var X__mb_cur_max int32 = 1
|
||||
|
||||
var startTime = gotime.Now() // For clock(3)
|
||||
|
||||
type file uintptr
|
||||
@ -282,24 +293,23 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr {
|
||||
|
||||
// struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||
func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
|
||||
panic(todo(""))
|
||||
// loc := gotime.Local
|
||||
// if r := getenv(Environ(), "TZ"); r != 0 {
|
||||
// zone, off := parseZone(GoString(r))
|
||||
// loc = gotime.FixedZone(zone, -off)
|
||||
// }
|
||||
// ut := *(*unix.Time_t)(unsafe.Pointer(timep))
|
||||
// t := gotime.Unix(int64(ut), 0).In(loc)
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1)
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900)
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay())
|
||||
// (*time.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t))
|
||||
// return result
|
||||
loc := gotime.Local
|
||||
if r := getenv(Environ(), "TZ"); r != 0 {
|
||||
zone, off := parseZone(GoString(r))
|
||||
loc = gotime.FixedZone(zone, -off)
|
||||
}
|
||||
ut := *(*time_t)(unsafe.Pointer(timep))
|
||||
t := gotime.Unix(int64(ut), 0).In(loc)
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1)
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900)
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay())
|
||||
(*time.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t))
|
||||
return result
|
||||
}
|
||||
|
||||
// int open(const char *pathname, int flags, ...);
|
||||
@ -574,40 +584,37 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
|
||||
|
||||
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
|
||||
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
|
||||
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int ioctl(int fd, unsigned long request, ...);
|
||||
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// var argp uintptr
|
||||
// if va != 0 {
|
||||
// argp = VaUintptr(&va)
|
||||
// }
|
||||
// n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp)
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
var argp uintptr
|
||||
if va != 0 {
|
||||
argp = VaUintptr(&va)
|
||||
}
|
||||
n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp)
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return int32(n)
|
||||
return int32(n)
|
||||
}
|
||||
|
||||
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
@ -651,13 +658,12 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
|
||||
|
||||
// int mkfifo(const char *pathname, mode_t mode);
|
||||
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
|
||||
panic(todo(""))
|
||||
// if err := unix.Mkfifo(GoString(pathname), mode); err != nil {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// mode_t umask(mode_t mask);
|
||||
@ -710,94 +716,86 @@ func Xuname(t *TLS, buf uintptr) int32 {
|
||||
|
||||
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
|
||||
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return types.Ssize_t(n)
|
||||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
|
||||
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return types.Ssize_t(n)
|
||||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// int shutdown(int sockfd, int how);
|
||||
func Xshutdown(t *TLS, sockfd, how int32) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int socket(int domain, int type, int protocol);
|
||||
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return int32(n)
|
||||
return int32(n)
|
||||
}
|
||||
|
||||
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
|
||||
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return int32(n)
|
||||
return int32(n)
|
||||
}
|
||||
|
||||
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
|
||||
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int listen(int sockfd, int backlog);
|
||||
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
@ -869,92 +867,6 @@ func Xsystem(t *TLS, command uintptr) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var staticGetpwuid pwd.Passwd
|
||||
|
||||
func init() {
|
||||
atExit = append(atExit, func() { closePasswd(&staticGetpwuid) })
|
||||
}
|
||||
|
||||
func closePasswd(p *pwd.Passwd) {
|
||||
Xfree(nil, p.Fpw_name)
|
||||
Xfree(nil, p.Fpw_passwd)
|
||||
Xfree(nil, p.Fpw_gecos)
|
||||
Xfree(nil, p.Fpw_dir)
|
||||
Xfree(nil, p.Fpw_shell)
|
||||
*p = pwd.Passwd{}
|
||||
}
|
||||
|
||||
// struct passwd *getpwuid(uid_t uid);
|
||||
func Xgetpwuid(t *TLS, uid uint32) uintptr {
|
||||
f, err := os.Open("/etc/passwd")
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v", origin(1), err)
|
||||
}
|
||||
panic(todo("", err))
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
|
||||
sid := strconv.Itoa(int(uid))
|
||||
sc := bufio.NewScanner(f)
|
||||
for sc.Scan() {
|
||||
s := strings.TrimSpace(sc.Text())
|
||||
if len(s) == 0 || strings.HasPrefix(s, "#") {
|
||||
continue
|
||||
}
|
||||
|
||||
// eg. "root:x:0:0:root:/root:/bin/bash"
|
||||
a := strings.Split(sc.Text(), ":")
|
||||
if len(a) < 7 {
|
||||
panic(todo("%q", sc.Text()))
|
||||
}
|
||||
|
||||
if a[2] == sid {
|
||||
uid, err := strconv.Atoi(a[2])
|
||||
if err != nil {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
gid, err := strconv.Atoi(a[3])
|
||||
if err != nil {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
closePasswd(&staticGetpwuid)
|
||||
gecos := a[4]
|
||||
if strings.Contains(gecos, ",") {
|
||||
a := strings.Split(gecos, ",")
|
||||
gecos = a[0]
|
||||
}
|
||||
initPasswd(t, &staticGetpwuid, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6])
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return uintptr(unsafe.Pointer(&staticGetpwuid))
|
||||
}
|
||||
}
|
||||
|
||||
if sc.Err() != nil {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: 0", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func initPasswd(t *TLS, p *pwd.Passwd, name, pwd string, uid, gid uint32, gecos, dir, shell string) {
|
||||
p.Fpw_name = cString(t, name)
|
||||
p.Fpw_passwd = cString(t, pwd)
|
||||
p.Fpw_uid = uid
|
||||
p.Fpw_gid = gid
|
||||
p.Fpw_gecos = cString(t, gecos)
|
||||
p.Fpw_dir = cString(t, dir)
|
||||
p.Fpw_shell = cString(t, shell)
|
||||
}
|
||||
|
||||
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
|
||||
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
|
||||
return 0 //TODO
|
||||
@ -996,171 +908,6 @@ func Xfileno(t *TLS, stream uintptr) int32 {
|
||||
return -1
|
||||
}
|
||||
|
||||
// var staticGetpwnam pwd.Passwd
|
||||
//
|
||||
// func init() {
|
||||
// atExit = append(atExit, func() { closePasswd(&staticGetpwnam) })
|
||||
// }
|
||||
|
||||
// struct passwd *getpwnam(const char *name);
|
||||
func Xgetpwnam(t *TLS, name uintptr) uintptr {
|
||||
panic(todo(""))
|
||||
// f, err := os.Open("/etc/passwd")
|
||||
// if err != nil {
|
||||
// panic(todo("", err))
|
||||
// }
|
||||
|
||||
// defer f.Close()
|
||||
|
||||
// sname := GoString(name)
|
||||
// sc := bufio.NewScanner(f)
|
||||
// for sc.Scan() {
|
||||
// // eg. "root:x:0:0:root:/root:/bin/bash"
|
||||
// a := strings.Split(sc.Text(), ":")
|
||||
// if len(a) < 7 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// if a[0] == sname {
|
||||
// uid, err := strconv.Atoi(a[2])
|
||||
// if err != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// gid, err := strconv.Atoi(a[3])
|
||||
// if err != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// closePasswd(&staticGetpwnam)
|
||||
// gecos := a[4]
|
||||
// if strings.Contains(gecos, ",") {
|
||||
// a := strings.Split(gecos, ",")
|
||||
// gecos = a[0]
|
||||
// }
|
||||
// initPasswd(t, &staticGetpwnam, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6])
|
||||
// return uintptr(unsafe.Pointer(&staticGetpwnam))
|
||||
// }
|
||||
// }
|
||||
|
||||
// if sc.Err() != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// var staticGetgrnam grp.Group
|
||||
//
|
||||
// func init() {
|
||||
// atExit = append(atExit, func() { closeGroup(&staticGetgrnam) })
|
||||
// }
|
||||
|
||||
// struct group *getgrnam(const char *name);
|
||||
func Xgetgrnam(t *TLS, name uintptr) uintptr {
|
||||
panic(todo(""))
|
||||
// f, err := os.Open("/etc/group")
|
||||
// if err != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// defer f.Close()
|
||||
|
||||
// sname := GoString(name)
|
||||
// sc := bufio.NewScanner(f)
|
||||
// for sc.Scan() {
|
||||
// // eg. "root:x:0:"
|
||||
// a := strings.Split(sc.Text(), ":")
|
||||
// if len(a) < 4 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// if a[0] == sname {
|
||||
// closeGroup(&staticGetgrnam)
|
||||
// gid, err := strconv.Atoi(a[2])
|
||||
// if err != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// var names []string
|
||||
// if a[3] != "" {
|
||||
// names = strings.Split(a[3], ",")
|
||||
// }
|
||||
// initGroup(t, &staticGetgrnam, a[0], a[1], uint32(gid), names)
|
||||
// return uintptr(unsafe.Pointer(&staticGetgrnam))
|
||||
// }
|
||||
// }
|
||||
|
||||
// if sc.Err() != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// func closeGroup(p *grp.Group) {
|
||||
// Xfree(nil, p.Fgr_name)
|
||||
// Xfree(nil, p.Fgr_passwd)
|
||||
// if p.Fgr_mem != 0 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
//
|
||||
// *p = grp.Group{}
|
||||
// }
|
||||
//
|
||||
// func initGroup(t *TLS, p *grp.Group, name, pwd string, gid uint32, names []string) {
|
||||
// p.Fgr_name = cString(t, name)
|
||||
// p.Fgr_passwd = cString(t, pwd)
|
||||
// p.Fgr_gid = gid
|
||||
// p.Fgr_mem = 0
|
||||
// if len(names) != 0 {
|
||||
// panic(todo("%q %q %v %q %v", name, pwd, gid, names, len(names)))
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// func init() {
|
||||
// atExit = append(atExit, func() { closeGroup(&staticGetgrgid) })
|
||||
// }
|
||||
//
|
||||
// var staticGetgrgid grp.Group
|
||||
|
||||
// struct group *getgrgid(gid_t gid);
|
||||
func Xgetgrgid(t *TLS, gid uint32) uintptr {
|
||||
panic(todo(""))
|
||||
// f, err := os.Open("/etc/group")
|
||||
// if err != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// defer f.Close()
|
||||
|
||||
// sid := strconv.Itoa(int(gid))
|
||||
// sc := bufio.NewScanner(f)
|
||||
// for sc.Scan() {
|
||||
// // eg. "root:x:0:"
|
||||
// a := strings.Split(sc.Text(), ":")
|
||||
// if len(a) < 4 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// if a[2] == sid {
|
||||
// closeGroup(&staticGetgrgid)
|
||||
// var names []string
|
||||
// if a[3] != "" {
|
||||
// names = strings.Split(a[3], ",")
|
||||
// }
|
||||
// initGroup(t, &staticGetgrgid, a[0], a[1], gid, names)
|
||||
// return uintptr(unsafe.Pointer(&staticGetgrgid))
|
||||
// }
|
||||
// }
|
||||
|
||||
// if sc.Err() != nil {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
panic(todo(""))
|
||||
@ -1905,18 +1652,6 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func X__darwin_fd_set(...interface{}) {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
func X__darwin_fd_clr(...interface{}) {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
func X__darwin_fd_isset(...interface{}) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// uint64_t mach_absolute_time(void);
|
||||
func Xmach_absolute_time(t *TLS) uint64 {
|
||||
return uint64(gotime.Now().UnixNano())
|
||||
@ -2115,44 +1850,155 @@ func Xarc4random_buf(t *TLS, buf uintptr, buflen size_t) {
|
||||
}
|
||||
}
|
||||
|
||||
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
|
||||
return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3)))
|
||||
type darwin_mutexattr_t struct {
|
||||
sig int64
|
||||
x [8]byte
|
||||
}
|
||||
|
||||
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
|
||||
return (*(*int32)(unsafe.Pointer((m /* &.__u */ /* &.__i */))) & 15)
|
||||
type darwin_mutex_t struct {
|
||||
sig int64
|
||||
x [65]byte
|
||||
}
|
||||
|
||||
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
|
||||
return *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
|
||||
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 {
|
||||
return (int32((*darwin_mutexattr_t)(unsafe.Pointer(a)).x[4] >> 2 & 3))
|
||||
}
|
||||
|
||||
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
|
||||
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
|
||||
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 {
|
||||
return (int32((*darwin_mutex_t)(unsafe.Pointer(m)).x[4] >> 2 & 3))
|
||||
}
|
||||
|
||||
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
|
||||
if uint32(state) > 1 {
|
||||
return 22
|
||||
}
|
||||
*(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4)) = state
|
||||
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 {
|
||||
*(*darwin_mutexattr_t)(unsafe.Pointer(a)) = darwin_mutexattr_t{}
|
||||
return 0
|
||||
}
|
||||
|
||||
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
|
||||
return 0
|
||||
}
|
||||
|
||||
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
|
||||
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
|
||||
return 0
|
||||
}
|
||||
|
||||
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
|
||||
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 {
|
||||
if uint32(type1) > uint32(2) {
|
||||
return 22
|
||||
return errno.EINVAL
|
||||
}
|
||||
(*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1))
|
||||
(*darwin_mutexattr_t)(unsafe.Pointer(a)).x[4] = byte(type1 << 2)
|
||||
return 0
|
||||
}
|
||||
|
||||
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
|
||||
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
|
||||
// if dmesgs {
|
||||
// dmesg("%v: fd %v iov %#x iovcnt %v", origin(1), fd, iov, iovcnt)
|
||||
// }
|
||||
r, _, err := unix.Syscall(unix.SYS_WRITEV, uintptr(fd), iov, uintptr(iovcnt))
|
||||
if err != 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return types.Ssize_t(r)
|
||||
}
|
||||
|
||||
// int pause(void);
|
||||
func Xpause(t *TLS) int32 {
|
||||
c := make(chan os.Signal)
|
||||
gosignal.Notify(c,
|
||||
syscall.SIGABRT,
|
||||
syscall.SIGALRM,
|
||||
syscall.SIGBUS,
|
||||
syscall.SIGCHLD,
|
||||
syscall.SIGCONT,
|
||||
syscall.SIGFPE,
|
||||
syscall.SIGHUP,
|
||||
syscall.SIGILL,
|
||||
// syscall.SIGINT,
|
||||
syscall.SIGIO,
|
||||
syscall.SIGIOT,
|
||||
syscall.SIGKILL,
|
||||
syscall.SIGPIPE,
|
||||
syscall.SIGPROF,
|
||||
syscall.SIGQUIT,
|
||||
syscall.SIGSEGV,
|
||||
syscall.SIGSTOP,
|
||||
syscall.SIGSYS,
|
||||
syscall.SIGTERM,
|
||||
syscall.SIGTRAP,
|
||||
syscall.SIGTSTP,
|
||||
syscall.SIGTTIN,
|
||||
syscall.SIGTTOU,
|
||||
syscall.SIGURG,
|
||||
syscall.SIGUSR1,
|
||||
syscall.SIGUSR2,
|
||||
syscall.SIGVTALRM,
|
||||
syscall.SIGWINCH,
|
||||
syscall.SIGXCPU,
|
||||
syscall.SIGXFSZ,
|
||||
)
|
||||
switch <-c {
|
||||
case syscall.SIGINT:
|
||||
panic(todo(""))
|
||||
default:
|
||||
t.setErrno(errno.EINTR)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
// #define __DARWIN_FD_SETSIZE 1024
|
||||
// #define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */
|
||||
// #define __DARWIN_NBBY 8 /* bits in a byte */
|
||||
// #define __DARWIN_howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */
|
||||
|
||||
// typedef struct fd_set {
|
||||
// __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
|
||||
// } fd_set;
|
||||
|
||||
// __darwin_fd_set(int _fd, struct fd_set *const _p)
|
||||
// {
|
||||
// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));
|
||||
// }
|
||||
func X__darwin_fd_set(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:12:1: */
|
||||
*(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) |= int32(uint64(uint64(1)) << (uint64(_fd) % (uint64(unsafe.Sizeof(int32(0))) * uint64(8))))
|
||||
return int32(0)
|
||||
}
|
||||
|
||||
// __darwin_fd_isset(int _fd, const struct fd_set *_p)
|
||||
// {
|
||||
// return _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)));
|
||||
// }
|
||||
func X__darwin_fd_isset(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:17:1: */
|
||||
return *(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) & int32(uint64(uint64(1))<<(uint64(_fd)%(uint64(unsafe.Sizeof(int32(0)))*uint64(8))))
|
||||
}
|
||||
|
||||
// __darwin_fd_clr(int _fd, struct fd_set *const _p)
|
||||
// {
|
||||
// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));
|
||||
// }
|
||||
func X__darwin_fd_clr(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:22:1: */
|
||||
*(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) &= ^int32(uint64(uint64(1)) << (uint64(_fd) % (uint64(unsafe.Sizeof(int32(0))) * uint64(8))))
|
||||
return int32(0)
|
||||
}
|
||||
|
||||
// int ungetc(int c, FILE *stream);
|
||||
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// int issetugid(void);
|
||||
func Xissetugid(t *TLS) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user