Bump sigs.k8s.io/metrics-server to a pseudo version which use Kuberentes v1.31 but don't rely on Go 1.23
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
This commit is contained in:
parent
93a68eb11a
commit
ce69be8874
34
go.mod
34
go.mod
|
@ -15,8 +15,8 @@ require (
|
||||||
github.com/kr/pretty v0.3.1
|
github.com/kr/pretty v0.3.1
|
||||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f
|
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f
|
||||||
github.com/olekukonko/tablewriter v0.0.5
|
github.com/olekukonko/tablewriter v0.0.5
|
||||||
github.com/onsi/ginkgo/v2 v2.19.0
|
github.com/onsi/ginkgo/v2 v2.20.1
|
||||||
github.com/onsi/gomega v1.33.1
|
github.com/onsi/gomega v1.34.1
|
||||||
github.com/opensearch-project/opensearch-go v1.1.0
|
github.com/opensearch-project/opensearch-go v1.1.0
|
||||||
github.com/prometheus/client_golang v1.19.1
|
github.com/prometheus/client_golang v1.19.1
|
||||||
github.com/spf13/cobra v1.8.1
|
github.com/spf13/cobra v1.8.1
|
||||||
|
@ -27,11 +27,11 @@ require (
|
||||||
github.com/vektra/mockery/v2 v2.10.0
|
github.com/vektra/mockery/v2 v2.10.0
|
||||||
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64
|
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64
|
||||||
go.uber.org/mock v0.4.0
|
go.uber.org/mock v0.4.0
|
||||||
golang.org/x/net v0.26.0
|
golang.org/x/net v0.28.0
|
||||||
golang.org/x/term v0.21.0
|
golang.org/x/term v0.23.0
|
||||||
golang.org/x/text v0.16.0
|
golang.org/x/text v0.17.0
|
||||||
golang.org/x/time v0.5.0
|
golang.org/x/time v0.5.0
|
||||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
|
golang.org/x/tools v0.24.0
|
||||||
gomodules.xyz/jsonpatch/v2 v2.4.0
|
gomodules.xyz/jsonpatch/v2 v2.4.0
|
||||||
google.golang.org/grpc v1.65.0
|
google.golang.org/grpc v1.65.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
|
@ -58,7 +58,7 @@ require (
|
||||||
sigs.k8s.io/custom-metrics-apiserver v1.30.1-0.20241105195130-84dc8cfe2555
|
sigs.k8s.io/custom-metrics-apiserver v1.30.1-0.20241105195130-84dc8cfe2555
|
||||||
sigs.k8s.io/kind v0.24.0
|
sigs.k8s.io/kind v0.24.0
|
||||||
sigs.k8s.io/mcs-api v0.1.0
|
sigs.k8s.io/mcs-api v0.1.0
|
||||||
sigs.k8s.io/metrics-server v0.7.1
|
sigs.k8s.io/metrics-server v0.7.1-0.20240906155142-bb44be145648
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
||||||
sigs.k8s.io/yaml v1.4.0
|
sigs.k8s.io/yaml v1.4.0
|
||||||
)
|
)
|
||||||
|
@ -91,7 +91,7 @@ require (
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
github.com/go-logr/stdr v1.2.2 // indirect
|
||||||
github.com/go-logr/zapr v1.3.0 // indirect
|
github.com/go-logr/zapr v1.3.0 // indirect
|
||||||
github.com/go-openapi/jsonreference v0.20.4 // indirect
|
github.com/go-openapi/jsonreference v0.20.4 // indirect
|
||||||
github.com/go-openapi/swag v0.22.7 // indirect
|
github.com/go-openapi/swag v0.22.9 // indirect
|
||||||
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
github.com/golang/protobuf v1.5.4 // indirect
|
github.com/golang/protobuf v1.5.4 // indirect
|
||||||
|
@ -99,7 +99,7 @@ require (
|
||||||
github.com/google/cel-go v0.20.1 // indirect
|
github.com/google/cel-go v0.20.1 // indirect
|
||||||
github.com/google/gnostic-models v0.6.8 // indirect
|
github.com/google/gnostic-models v0.6.8 // indirect
|
||||||
github.com/google/gofuzz v1.2.0 // indirect
|
github.com/google/gofuzz v1.2.0 // indirect
|
||||||
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
|
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
|
||||||
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
|
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||||
github.com/gorilla/websocket v1.5.0 // indirect
|
github.com/gorilla/websocket v1.5.0 // indirect
|
||||||
|
@ -161,7 +161,7 @@ require (
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
|
||||||
go.opentelemetry.io/otel v1.28.0 // indirect
|
go.opentelemetry.io/otel v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
|
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
||||||
|
@ -170,14 +170,14 @@ require (
|
||||||
go.uber.org/atomic v1.11.0 // indirect
|
go.uber.org/atomic v1.11.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.26.0 // indirect
|
go.uber.org/zap v1.26.0 // indirect
|
||||||
golang.org/x/crypto v0.24.0 // indirect
|
golang.org/x/crypto v0.26.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
|
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
|
||||||
golang.org/x/mod v0.17.0 // indirect
|
golang.org/x/mod v0.20.0 // indirect
|
||||||
golang.org/x/oauth2 v0.21.0 // indirect
|
golang.org/x/oauth2 v0.21.0 // indirect
|
||||||
golang.org/x/sync v0.7.0 // indirect
|
golang.org/x/sync v0.8.0 // indirect
|
||||||
golang.org/x/sys v0.21.0 // indirect
|
golang.org/x/sys v0.23.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
|
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
|
||||||
google.golang.org/protobuf v1.34.2 // indirect
|
google.golang.org/protobuf v1.34.2 // indirect
|
||||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
|
|
68
go.sum
68
go.sum
|
@ -291,8 +291,8 @@ github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/
|
||||||
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8=
|
github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE=
|
||||||
github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0=
|
github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE=
|
||||||
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||||
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
||||||
github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
|
github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
|
||||||
|
@ -392,8 +392,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe
|
||||||
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
|
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
|
||||||
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI=
|
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI=
|
||||||
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg=
|
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg=
|
||||||
|
@ -591,15 +591,15 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
|
||||||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||||
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
|
github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo=
|
||||||
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
|
github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
|
||||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
|
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
|
||||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
|
||||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||||
github.com/opensearch-project/opensearch-go v1.1.0 h1:eG5sh3843bbU1itPRjA9QXbxcg8LaZ+DjEzQH9aLN3M=
|
github.com/opensearch-project/opensearch-go v1.1.0 h1:eG5sh3843bbU1itPRjA9QXbxcg8LaZ+DjEzQH9aLN3M=
|
||||||
|
@ -830,8 +830,8 @@ go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
|
||||||
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
|
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s=
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ=
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw=
|
||||||
go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=
|
go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=
|
||||||
go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=
|
go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=
|
||||||
go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE=
|
go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE=
|
||||||
|
@ -881,8 +881,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y
|
||||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||||
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
|
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||||
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
|
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
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-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
|
@ -893,8 +893,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
|
||||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||||
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
|
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
|
||||||
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
|
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
|
||||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
|
@ -922,8 +922,8 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
|
||||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
@ -980,8 +980,8 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
|
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
|
||||||
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
|
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
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-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
@ -1012,8 +1012,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
@ -1101,13 +1101,13 @@ golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
|
||||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
|
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
|
||||||
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
|
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
|
||||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
@ -1118,8 +1118,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
||||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
@ -1190,8 +1190,8 @@ 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.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||||
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
|
||||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -1306,10 +1306,10 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6
|
||||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||||
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos=
|
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos=
|
||||||
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY=
|
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY=
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU=
|
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b h1:04+jVzTs2XBnOZcPsLnmrTGqltqJbZQ1Ey26hjYdQQ0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
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.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||||
|
@ -1496,8 +1496,8 @@ sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrL
|
||||||
sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U=
|
sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U=
|
||||||
sigs.k8s.io/mcs-api v0.1.0 h1:edDbg0oRGfXw8TmZjKYep06LcJLv/qcYLidejnUp0PM=
|
sigs.k8s.io/mcs-api v0.1.0 h1:edDbg0oRGfXw8TmZjKYep06LcJLv/qcYLidejnUp0PM=
|
||||||
sigs.k8s.io/mcs-api v0.1.0/go.mod h1:gGiAryeFNB4GBsq2LBmVqSgKoobLxt+p7ii/WG5QYYw=
|
sigs.k8s.io/mcs-api v0.1.0/go.mod h1:gGiAryeFNB4GBsq2LBmVqSgKoobLxt+p7ii/WG5QYYw=
|
||||||
sigs.k8s.io/metrics-server v0.7.1 h1:LhdCzkaI7VI7/N7pR4hDauTuWyc9Pxr+ihjTDuS9GIo=
|
sigs.k8s.io/metrics-server v0.7.1-0.20240906155142-bb44be145648 h1:jVXkmXUCSN3F1vXAH4NX5+SrgxPkNEljBiEiNHlsNuw=
|
||||||
sigs.k8s.io/metrics-server v0.7.1/go.mod h1:vt+pIEbw5tpmyRR46WJb3pRm1JEzf/HxRN+VClTKuqI=
|
sigs.k8s.io/metrics-server v0.7.1-0.20240906155142-bb44be145648/go.mod h1:ZgbWJ19AjUfjDE00YSfjr/8IUlufT3iRFiHjLNzxI/k=
|
||||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
# Benchmarks
|
||||||
|
|
||||||
|
## Name mangling utilities
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go test -bench XXX -run XXX -benchtime 30s
|
||||||
|
```
|
||||||
|
|
||||||
|
### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df
|
||||||
|
|
||||||
|
```
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
pkg: github.com/go-openapi/swag
|
||||||
|
cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
|
||||||
|
BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op
|
||||||
|
BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op
|
||||||
|
BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op
|
||||||
|
BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op
|
||||||
|
```
|
||||||
|
|
||||||
|
### Benchmarks after PR #79
|
||||||
|
|
||||||
|
~ x10 performance improvement and ~ /100 memory allocations.
|
||||||
|
|
||||||
|
```
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
pkg: github.com/go-openapi/swag
|
||||||
|
cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
|
||||||
|
BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op
|
||||||
|
BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
pkg: github.com/go-openapi/swag
|
||||||
|
cpu: AMD Ryzen 7 5800X 8-Core Processor
|
||||||
|
BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op
|
||||||
|
BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op
|
||||||
|
BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op
|
||||||
|
```
|
|
@ -16,9 +16,130 @@ package swag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// commonInitialisms are common acronyms that are kept as whole uppercased words.
|
||||||
|
commonInitialisms *indexOfInitialisms
|
||||||
|
|
||||||
|
// initialisms is a slice of sorted initialisms
|
||||||
|
initialisms []string
|
||||||
|
|
||||||
|
// a copy of initialisms pre-baked as []rune
|
||||||
|
initialismsRunes [][]rune
|
||||||
|
initialismsUpperCased [][]rune
|
||||||
|
|
||||||
|
isInitialism func(string) bool
|
||||||
|
|
||||||
|
maxAllocMatches int
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769
|
||||||
|
configuredInitialisms := map[string]bool{
|
||||||
|
"ACL": true,
|
||||||
|
"API": true,
|
||||||
|
"ASCII": true,
|
||||||
|
"CPU": true,
|
||||||
|
"CSS": true,
|
||||||
|
"DNS": true,
|
||||||
|
"EOF": true,
|
||||||
|
"GUID": true,
|
||||||
|
"HTML": true,
|
||||||
|
"HTTPS": true,
|
||||||
|
"HTTP": true,
|
||||||
|
"ID": true,
|
||||||
|
"IP": true,
|
||||||
|
"IPv4": true,
|
||||||
|
"IPv6": true,
|
||||||
|
"JSON": true,
|
||||||
|
"LHS": true,
|
||||||
|
"OAI": true,
|
||||||
|
"QPS": true,
|
||||||
|
"RAM": true,
|
||||||
|
"RHS": true,
|
||||||
|
"RPC": true,
|
||||||
|
"SLA": true,
|
||||||
|
"SMTP": true,
|
||||||
|
"SQL": true,
|
||||||
|
"SSH": true,
|
||||||
|
"TCP": true,
|
||||||
|
"TLS": true,
|
||||||
|
"TTL": true,
|
||||||
|
"UDP": true,
|
||||||
|
"UI": true,
|
||||||
|
"UID": true,
|
||||||
|
"UUID": true,
|
||||||
|
"URI": true,
|
||||||
|
"URL": true,
|
||||||
|
"UTF8": true,
|
||||||
|
"VM": true,
|
||||||
|
"XML": true,
|
||||||
|
"XMPP": true,
|
||||||
|
"XSRF": true,
|
||||||
|
"XSS": true,
|
||||||
|
}
|
||||||
|
|
||||||
|
// a thread-safe index of initialisms
|
||||||
|
commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms)
|
||||||
|
initialisms = commonInitialisms.sorted()
|
||||||
|
initialismsRunes = asRunes(initialisms)
|
||||||
|
initialismsUpperCased = asUpperCased(initialisms)
|
||||||
|
maxAllocMatches = maxAllocHeuristic(initialismsRunes)
|
||||||
|
|
||||||
|
// a test function
|
||||||
|
isInitialism = commonInitialisms.isInitialism
|
||||||
|
}
|
||||||
|
|
||||||
|
func asRunes(in []string) [][]rune {
|
||||||
|
out := make([][]rune, len(in))
|
||||||
|
for i, initialism := range in {
|
||||||
|
out[i] = []rune(initialism)
|
||||||
|
}
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
func asUpperCased(in []string) [][]rune {
|
||||||
|
out := make([][]rune, len(in))
|
||||||
|
|
||||||
|
for i, initialism := range in {
|
||||||
|
out[i] = []rune(upper(trim(initialism)))
|
||||||
|
}
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
func maxAllocHeuristic(in [][]rune) int {
|
||||||
|
heuristic := make(map[rune]int)
|
||||||
|
for _, initialism := range in {
|
||||||
|
heuristic[initialism[0]]++
|
||||||
|
}
|
||||||
|
|
||||||
|
var maxAlloc int
|
||||||
|
for _, val := range heuristic {
|
||||||
|
if val > maxAlloc {
|
||||||
|
maxAlloc = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return maxAlloc
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddInitialisms add additional initialisms
|
||||||
|
func AddInitialisms(words ...string) {
|
||||||
|
for _, word := range words {
|
||||||
|
// commonInitialisms[upper(word)] = true
|
||||||
|
commonInitialisms.add(upper(word))
|
||||||
|
}
|
||||||
|
// sort again
|
||||||
|
initialisms = commonInitialisms.sorted()
|
||||||
|
initialismsRunes = asRunes(initialisms)
|
||||||
|
initialismsUpperCased = asUpperCased(initialisms)
|
||||||
|
}
|
||||||
|
|
||||||
// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
|
// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms.
|
||||||
// Since go1.9, this may be implemented with sync.Map.
|
// Since go1.9, this may be implemented with sync.Map.
|
||||||
type indexOfInitialisms struct {
|
type indexOfInitialisms struct {
|
||||||
|
@ -63,3 +184,19 @@ func (m *indexOfInitialisms) sorted() (result []string) {
|
||||||
sort.Sort(sort.Reverse(byInitialism(result)))
|
sort.Sort(sort.Reverse(byInitialism(result)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type byInitialism []string
|
||||||
|
|
||||||
|
func (s byInitialism) Len() int {
|
||||||
|
return len(s)
|
||||||
|
}
|
||||||
|
func (s byInitialism) Swap(i, j int) {
|
||||||
|
s[i], s[j] = s[j], s[i]
|
||||||
|
}
|
||||||
|
func (s byInitialism) Less(i, j int) bool {
|
||||||
|
if len(s[i]) != len(s[j]) {
|
||||||
|
return len(s[i]) < len(s[j])
|
||||||
|
}
|
||||||
|
|
||||||
|
return strings.Compare(s[i], s[j]) > 0
|
||||||
|
}
|
||||||
|
|
|
@ -14,74 +14,80 @@
|
||||||
|
|
||||||
package swag
|
package swag
|
||||||
|
|
||||||
import "unicode"
|
import (
|
||||||
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
nameLexem interface {
|
lexemKind uint8
|
||||||
GetUnsafeGoName() string
|
|
||||||
GetOriginal() string
|
|
||||||
IsInitialism() bool
|
|
||||||
}
|
|
||||||
|
|
||||||
initialismNameLexem struct {
|
nameLexem struct {
|
||||||
original string
|
original string
|
||||||
matchedInitialism string
|
matchedInitialism string
|
||||||
}
|
kind lexemKind
|
||||||
|
|
||||||
casualNameLexem struct {
|
|
||||||
original string
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem {
|
const (
|
||||||
return &initialismNameLexem{
|
lexemKindCasualName lexemKind = iota
|
||||||
|
lexemKindInitialismName
|
||||||
|
)
|
||||||
|
|
||||||
|
func newInitialismNameLexem(original, matchedInitialism string) nameLexem {
|
||||||
|
return nameLexem{
|
||||||
|
kind: lexemKindInitialismName,
|
||||||
original: original,
|
original: original,
|
||||||
matchedInitialism: matchedInitialism,
|
matchedInitialism: matchedInitialism,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newCasualNameLexem(original string) *casualNameLexem {
|
func newCasualNameLexem(original string) nameLexem {
|
||||||
return &casualNameLexem{
|
return nameLexem{
|
||||||
|
kind: lexemKindCasualName,
|
||||||
original: original,
|
original: original,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *initialismNameLexem) GetUnsafeGoName() string {
|
func (l nameLexem) GetUnsafeGoName() string {
|
||||||
return l.matchedInitialism
|
if l.kind == lexemKindInitialismName {
|
||||||
}
|
return l.matchedInitialism
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
first rune
|
||||||
|
rest string
|
||||||
|
)
|
||||||
|
|
||||||
func (l *casualNameLexem) GetUnsafeGoName() string {
|
|
||||||
var first rune
|
|
||||||
var rest string
|
|
||||||
for i, orig := range l.original {
|
for i, orig := range l.original {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
first = orig
|
first = orig
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
rest = l.original[i:]
|
rest = l.original[i:]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(l.original) > 1 {
|
if len(l.original) > 1 {
|
||||||
return string(unicode.ToUpper(first)) + lower(rest)
|
b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest))
|
||||||
|
defer func() {
|
||||||
|
poolOfBuffers.RedeemBuffer(b)
|
||||||
|
}()
|
||||||
|
b.WriteRune(unicode.ToUpper(first))
|
||||||
|
b.WriteString(lower(rest))
|
||||||
|
return b.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
return l.original
|
return l.original
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *initialismNameLexem) GetOriginal() string {
|
func (l nameLexem) GetOriginal() string {
|
||||||
return l.original
|
return l.original
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *casualNameLexem) GetOriginal() string {
|
func (l nameLexem) IsInitialism() bool {
|
||||||
return l.original
|
return l.kind == lexemKindInitialismName
|
||||||
}
|
|
||||||
|
|
||||||
func (l *initialismNameLexem) IsInitialism() bool {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *casualNameLexem) IsInitialism() bool {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,124 +15,269 @@
|
||||||
package swag
|
package swag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
|
"sync"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
)
|
)
|
||||||
|
|
||||||
var nameReplaceTable = map[rune]string{
|
|
||||||
'@': "At ",
|
|
||||||
'&': "And ",
|
|
||||||
'|': "Pipe ",
|
|
||||||
'$': "Dollar ",
|
|
||||||
'!': "Bang ",
|
|
||||||
'-': "",
|
|
||||||
'_': "",
|
|
||||||
}
|
|
||||||
|
|
||||||
type (
|
type (
|
||||||
splitter struct {
|
splitter struct {
|
||||||
postSplitInitialismCheck bool
|
|
||||||
initialisms []string
|
initialisms []string
|
||||||
|
initialismsRunes [][]rune
|
||||||
|
initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version
|
||||||
|
postSplitInitialismCheck bool
|
||||||
}
|
}
|
||||||
|
|
||||||
splitterOption func(*splitter) *splitter
|
splitterOption func(*splitter)
|
||||||
|
|
||||||
|
initialismMatch struct {
|
||||||
|
body []rune
|
||||||
|
start, end int
|
||||||
|
complete bool
|
||||||
|
}
|
||||||
|
initialismMatches []initialismMatch
|
||||||
)
|
)
|
||||||
|
|
||||||
// split calls the splitter; splitter provides more control and post options
|
type (
|
||||||
func split(str string) []string {
|
// memory pools of temporary objects.
|
||||||
lexems := newSplitter().split(str)
|
//
|
||||||
result := make([]string, 0, len(lexems))
|
// These are used to recycle temporarily allocated objects
|
||||||
|
// and relieve the GC from undue pressure.
|
||||||
|
|
||||||
for _, lexem := range lexems {
|
matchesPool struct {
|
||||||
|
*sync.Pool
|
||||||
|
}
|
||||||
|
|
||||||
|
buffersPool struct {
|
||||||
|
*sync.Pool
|
||||||
|
}
|
||||||
|
|
||||||
|
lexemsPool struct {
|
||||||
|
*sync.Pool
|
||||||
|
}
|
||||||
|
|
||||||
|
splittersPool struct {
|
||||||
|
*sync.Pool
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// poolOfMatches holds temporary slices for recycling during the initialism match process
|
||||||
|
poolOfMatches = matchesPool{
|
||||||
|
Pool: &sync.Pool{
|
||||||
|
New: func() any {
|
||||||
|
s := make(initialismMatches, 0, maxAllocMatches)
|
||||||
|
|
||||||
|
return &s
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
poolOfBuffers = buffersPool{
|
||||||
|
Pool: &sync.Pool{
|
||||||
|
New: func() any {
|
||||||
|
return new(bytes.Buffer)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
poolOfLexems = lexemsPool{
|
||||||
|
Pool: &sync.Pool{
|
||||||
|
New: func() any {
|
||||||
|
s := make([]nameLexem, 0, maxAllocMatches)
|
||||||
|
|
||||||
|
return &s
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
poolOfSplitters = splittersPool{
|
||||||
|
Pool: &sync.Pool{
|
||||||
|
New: func() any {
|
||||||
|
s := newSplitter()
|
||||||
|
|
||||||
|
return &s
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// nameReplaceTable finds a word representation for special characters.
|
||||||
|
func nameReplaceTable(r rune) (string, bool) {
|
||||||
|
switch r {
|
||||||
|
case '@':
|
||||||
|
return "At ", true
|
||||||
|
case '&':
|
||||||
|
return "And ", true
|
||||||
|
case '|':
|
||||||
|
return "Pipe ", true
|
||||||
|
case '$':
|
||||||
|
return "Dollar ", true
|
||||||
|
case '!':
|
||||||
|
return "Bang ", true
|
||||||
|
case '-':
|
||||||
|
return "", true
|
||||||
|
case '_':
|
||||||
|
return "", true
|
||||||
|
default:
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// split calls the splitter.
|
||||||
|
//
|
||||||
|
// Use newSplitter for more control and options
|
||||||
|
func split(str string) []string {
|
||||||
|
s := poolOfSplitters.BorrowSplitter()
|
||||||
|
lexems := s.split(str)
|
||||||
|
result := make([]string, 0, len(*lexems))
|
||||||
|
|
||||||
|
for _, lexem := range *lexems {
|
||||||
result = append(result, lexem.GetOriginal())
|
result = append(result, lexem.GetOriginal())
|
||||||
}
|
}
|
||||||
|
poolOfLexems.RedeemLexems(lexems)
|
||||||
|
poolOfSplitters.RedeemSplitter(s)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *splitter) split(str string) []nameLexem {
|
func newSplitter(options ...splitterOption) splitter {
|
||||||
return s.toNameLexems(str)
|
s := splitter{
|
||||||
}
|
|
||||||
|
|
||||||
func newSplitter(options ...splitterOption) *splitter {
|
|
||||||
splitter := &splitter{
|
|
||||||
postSplitInitialismCheck: false,
|
postSplitInitialismCheck: false,
|
||||||
initialisms: initialisms,
|
initialisms: initialisms,
|
||||||
|
initialismsRunes: initialismsRunes,
|
||||||
|
initialismsUpperCased: initialismsUpperCased,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, option := range options {
|
for _, option := range options {
|
||||||
splitter = option(splitter)
|
option(&s)
|
||||||
}
|
}
|
||||||
|
|
||||||
return splitter
|
|
||||||
}
|
|
||||||
|
|
||||||
// withPostSplitInitialismCheck allows to catch initialisms after main split process
|
|
||||||
func withPostSplitInitialismCheck(s *splitter) *splitter {
|
|
||||||
s.postSplitInitialismCheck = true
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
// withPostSplitInitialismCheck allows to catch initialisms after main split process
|
||||||
initialismMatch struct {
|
func withPostSplitInitialismCheck(s *splitter) {
|
||||||
start, end int
|
s.postSplitInitialismCheck = true
|
||||||
body []rune
|
}
|
||||||
complete bool
|
|
||||||
}
|
|
||||||
initialismMatches []*initialismMatch
|
|
||||||
)
|
|
||||||
|
|
||||||
func (s *splitter) toNameLexems(name string) []nameLexem {
|
func (p matchesPool) BorrowMatches() *initialismMatches {
|
||||||
|
s := p.Get().(*initialismMatches)
|
||||||
|
*s = (*s)[:0] // reset slice, keep allocated capacity
|
||||||
|
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer {
|
||||||
|
s := p.Get().(*bytes.Buffer)
|
||||||
|
s.Reset()
|
||||||
|
|
||||||
|
if s.Cap() < size {
|
||||||
|
s.Grow(size)
|
||||||
|
}
|
||||||
|
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p lexemsPool) BorrowLexems() *[]nameLexem {
|
||||||
|
s := p.Get().(*[]nameLexem)
|
||||||
|
*s = (*s)[:0] // reset slice, keep allocated capacity
|
||||||
|
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter {
|
||||||
|
s := p.Get().(*splitter)
|
||||||
|
s.postSplitInitialismCheck = false // reset options
|
||||||
|
for _, apply := range options {
|
||||||
|
apply(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p matchesPool) RedeemMatches(s *initialismMatches) {
|
||||||
|
p.Put(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p buffersPool) RedeemBuffer(s *bytes.Buffer) {
|
||||||
|
p.Put(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p lexemsPool) RedeemLexems(s *[]nameLexem) {
|
||||||
|
p.Put(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p splittersPool) RedeemSplitter(s *splitter) {
|
||||||
|
p.Put(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m initialismMatch) isZero() bool {
|
||||||
|
return m.start == 0 && m.end == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s splitter) split(name string) *[]nameLexem {
|
||||||
nameRunes := []rune(name)
|
nameRunes := []rune(name)
|
||||||
matches := s.gatherInitialismMatches(nameRunes)
|
matches := s.gatherInitialismMatches(nameRunes)
|
||||||
|
if matches == nil {
|
||||||
|
return poolOfLexems.BorrowLexems()
|
||||||
|
}
|
||||||
|
|
||||||
return s.mapMatchesToNameLexems(nameRunes, matches)
|
return s.mapMatchesToNameLexems(nameRunes, matches)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches {
|
func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches {
|
||||||
matches := make(initialismMatches, 0)
|
var matches *initialismMatches
|
||||||
|
|
||||||
for currentRunePosition, currentRune := range nameRunes {
|
for currentRunePosition, currentRune := range nameRunes {
|
||||||
newMatches := make(initialismMatches, 0, len(matches))
|
// recycle these allocations as we loop over runes
|
||||||
|
// with such recycling, only 2 slices should be allocated per call
|
||||||
|
// instead of o(n).
|
||||||
|
newMatches := poolOfMatches.BorrowMatches()
|
||||||
|
|
||||||
// check current initialism matches
|
// check current initialism matches
|
||||||
for _, match := range matches {
|
if matches != nil { // skip first iteration
|
||||||
if keepCompleteMatch := match.complete; keepCompleteMatch {
|
for _, match := range *matches {
|
||||||
newMatches = append(newMatches, match)
|
if keepCompleteMatch := match.complete; keepCompleteMatch {
|
||||||
continue
|
*newMatches = append(*newMatches, match)
|
||||||
}
|
continue
|
||||||
|
|
||||||
// drop failed match
|
|
||||||
currentMatchRune := match.body[currentRunePosition-match.start]
|
|
||||||
if !s.initialismRuneEqual(currentMatchRune, currentRune) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// try to complete ongoing match
|
|
||||||
if currentRunePosition-match.start == len(match.body)-1 {
|
|
||||||
// we are close; the next step is to check the symbol ahead
|
|
||||||
// if it is a small letter, then it is not the end of match
|
|
||||||
// but beginning of the next word
|
|
||||||
|
|
||||||
if currentRunePosition < len(nameRunes)-1 {
|
|
||||||
nextRune := nameRunes[currentRunePosition+1]
|
|
||||||
if newWord := unicode.IsLower(nextRune); newWord {
|
|
||||||
// oh ok, it was the start of a new word
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
match.complete = true
|
// drop failed match
|
||||||
match.end = currentRunePosition
|
currentMatchRune := match.body[currentRunePosition-match.start]
|
||||||
}
|
if currentMatchRune != currentRune {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
newMatches = append(newMatches, match)
|
// try to complete ongoing match
|
||||||
|
if currentRunePosition-match.start == len(match.body)-1 {
|
||||||
|
// we are close; the next step is to check the symbol ahead
|
||||||
|
// if it is a small letter, then it is not the end of match
|
||||||
|
// but beginning of the next word
|
||||||
|
|
||||||
|
if currentRunePosition < len(nameRunes)-1 {
|
||||||
|
nextRune := nameRunes[currentRunePosition+1]
|
||||||
|
if newWord := unicode.IsLower(nextRune); newWord {
|
||||||
|
// oh ok, it was the start of a new word
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
match.complete = true
|
||||||
|
match.end = currentRunePosition
|
||||||
|
}
|
||||||
|
|
||||||
|
*newMatches = append(*newMatches, match)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for new initialism matches
|
// check for new initialism matches
|
||||||
for _, initialism := range s.initialisms {
|
for i := range s.initialisms {
|
||||||
initialismRunes := []rune(initialism)
|
initialismRunes := s.initialismsRunes[i]
|
||||||
if s.initialismRuneEqual(initialismRunes[0], currentRune) {
|
if initialismRunes[0] == currentRune {
|
||||||
newMatches = append(newMatches, &initialismMatch{
|
*newMatches = append(*newMatches, initialismMatch{
|
||||||
start: currentRunePosition,
|
start: currentRunePosition,
|
||||||
body: initialismRunes,
|
body: initialismRunes,
|
||||||
complete: false,
|
complete: false,
|
||||||
|
@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if matches != nil {
|
||||||
|
poolOfMatches.RedeemMatches(matches)
|
||||||
|
}
|
||||||
matches = newMatches
|
matches = newMatches
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// up to the caller to redeem this last slice
|
||||||
return matches
|
return matches
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem {
|
func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem {
|
||||||
nameLexems := make([]nameLexem, 0)
|
nameLexems := poolOfLexems.BorrowLexems()
|
||||||
|
|
||||||
var lastAcceptedMatch *initialismMatch
|
var lastAcceptedMatch initialismMatch
|
||||||
for _, match := range matches {
|
for _, match := range *matches {
|
||||||
if !match.complete {
|
if !match.complete {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if firstMatch := lastAcceptedMatch == nil; firstMatch {
|
if firstMatch := lastAcceptedMatch.isZero(); firstMatch {
|
||||||
nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...)
|
s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start])
|
||||||
nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
|
*nameLexems = append(*nameLexems, s.breakInitialism(string(match.body)))
|
||||||
|
|
||||||
lastAcceptedMatch = match
|
lastAcceptedMatch = match
|
||||||
|
|
||||||
|
@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa
|
||||||
}
|
}
|
||||||
|
|
||||||
middle := nameRunes[lastAcceptedMatch.end+1 : match.start]
|
middle := nameRunes[lastAcceptedMatch.end+1 : match.start]
|
||||||
nameLexems = append(nameLexems, s.breakCasualString(middle)...)
|
s.appendBrokenDownCasualString(nameLexems, middle)
|
||||||
nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
|
*nameLexems = append(*nameLexems, s.breakInitialism(string(match.body)))
|
||||||
|
|
||||||
lastAcceptedMatch = match
|
lastAcceptedMatch = match
|
||||||
}
|
}
|
||||||
|
|
||||||
// we have not found any accepted matches
|
// we have not found any accepted matches
|
||||||
if lastAcceptedMatch == nil {
|
if lastAcceptedMatch.isZero() {
|
||||||
return s.breakCasualString(nameRunes)
|
*nameLexems = (*nameLexems)[:0]
|
||||||
|
s.appendBrokenDownCasualString(nameLexems, nameRunes)
|
||||||
|
} else if lastAcceptedMatch.end+1 != len(nameRunes) {
|
||||||
|
rest := nameRunes[lastAcceptedMatch.end+1:]
|
||||||
|
s.appendBrokenDownCasualString(nameLexems, rest)
|
||||||
}
|
}
|
||||||
|
|
||||||
if lastAcceptedMatch.end+1 != len(nameRunes) {
|
poolOfMatches.RedeemMatches(matches)
|
||||||
rest := nameRunes[lastAcceptedMatch.end+1:]
|
|
||||||
nameLexems = append(nameLexems, s.breakCasualString(rest)...)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nameLexems
|
return nameLexems
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *splitter) initialismRuneEqual(a, b rune) bool {
|
func (s splitter) breakInitialism(original string) nameLexem {
|
||||||
return a == b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *splitter) breakInitialism(original string) nameLexem {
|
|
||||||
return newInitialismNameLexem(original, original)
|
return newInitialismNameLexem(original, original)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *splitter) breakCasualString(str []rune) []nameLexem {
|
func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) {
|
||||||
segments := make([]nameLexem, 0)
|
currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused
|
||||||
currentSegment := ""
|
defer func() {
|
||||||
|
poolOfBuffers.RedeemBuffer(currentSegment)
|
||||||
|
}()
|
||||||
|
|
||||||
addCasualNameLexem := func(original string) {
|
addCasualNameLexem := func(original string) {
|
||||||
segments = append(segments, newCasualNameLexem(original))
|
*segments = append(*segments, newCasualNameLexem(original))
|
||||||
}
|
}
|
||||||
|
|
||||||
addInitialismNameLexem := func(original, match string) {
|
addInitialismNameLexem := func(original, match string) {
|
||||||
segments = append(segments, newInitialismNameLexem(original, match))
|
*segments = append(*segments, newInitialismNameLexem(original, match))
|
||||||
}
|
}
|
||||||
|
|
||||||
addNameLexem := func(original string) {
|
var addNameLexem func(string)
|
||||||
if s.postSplitInitialismCheck {
|
if s.postSplitInitialismCheck {
|
||||||
for _, initialism := range s.initialisms {
|
addNameLexem = func(original string) {
|
||||||
if upper(initialism) == upper(original) {
|
for i := range s.initialisms {
|
||||||
addInitialismNameLexem(original, initialism)
|
if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) {
|
||||||
|
addInitialismNameLexem(original, s.initialisms[i])
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
addCasualNameLexem(original)
|
addCasualNameLexem(original)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
addNameLexem = addCasualNameLexem
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, rn := range string(str) {
|
for _, rn := range str {
|
||||||
if replace, found := nameReplaceTable[rn]; found {
|
if replace, found := nameReplaceTable(rn); found {
|
||||||
if currentSegment != "" {
|
if currentSegment.Len() > 0 {
|
||||||
addNameLexem(currentSegment)
|
addNameLexem(currentSegment.String())
|
||||||
currentSegment = ""
|
currentSegment.Reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
if replace != "" {
|
if replace != "" {
|
||||||
|
@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) {
|
if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) {
|
||||||
if currentSegment != "" {
|
if currentSegment.Len() > 0 {
|
||||||
addNameLexem(currentSegment)
|
addNameLexem(currentSegment.String())
|
||||||
currentSegment = ""
|
currentSegment.Reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if unicode.IsUpper(rn) {
|
if unicode.IsUpper(rn) {
|
||||||
if currentSegment != "" {
|
if currentSegment.Len() > 0 {
|
||||||
addNameLexem(currentSegment)
|
addNameLexem(currentSegment.String())
|
||||||
}
|
}
|
||||||
currentSegment = ""
|
currentSegment.Reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSegment += string(rn)
|
currentSegment.WriteRune(rn)
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentSegment != "" {
|
if currentSegment.Len() > 0 {
|
||||||
addNameLexem(currentSegment)
|
addNameLexem(currentSegment.String())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return segments
|
|
||||||
|
// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but
|
||||||
|
// it ignores leading and trailing blank spaces in the compared
|
||||||
|
// string.
|
||||||
|
//
|
||||||
|
// base is assumed to be composed of upper-cased runes, and be already
|
||||||
|
// trimmed.
|
||||||
|
//
|
||||||
|
// This code is heavily inspired from strings.EqualFold.
|
||||||
|
func isEqualFoldIgnoreSpace(base []rune, str string) bool {
|
||||||
|
var i, baseIndex int
|
||||||
|
// equivalent to b := []byte(str), but without data copy
|
||||||
|
b := hackStringBytes(str)
|
||||||
|
|
||||||
|
for i < len(b) {
|
||||||
|
if c := b[i]; c < utf8.RuneSelf {
|
||||||
|
// fast path for ASCII
|
||||||
|
if c != ' ' && c != '\t' {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// unicode case
|
||||||
|
r, size := utf8.DecodeRune(b[i:])
|
||||||
|
if !unicode.IsSpace(r) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
i += size
|
||||||
|
}
|
||||||
|
|
||||||
|
if i >= len(b) {
|
||||||
|
return len(base) == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, baseRune := range base {
|
||||||
|
if i >= len(b) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if c := b[i]; c < utf8.RuneSelf {
|
||||||
|
// single byte rune case (ASCII)
|
||||||
|
if baseRune >= utf8.RuneSelf {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
baseChar := byte(baseRune)
|
||||||
|
if c != baseChar &&
|
||||||
|
!('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
baseIndex++
|
||||||
|
i++
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// unicode case
|
||||||
|
r, size := utf8.DecodeRune(b[i:])
|
||||||
|
if unicode.ToUpper(r) != baseRune {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
baseIndex++
|
||||||
|
i += size
|
||||||
|
}
|
||||||
|
|
||||||
|
if baseIndex != len(base) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// all passed: now we should only have blanks
|
||||||
|
for i < len(b) {
|
||||||
|
if c := b[i]; c < utf8.RuneSelf {
|
||||||
|
// fast path for ASCII
|
||||||
|
if c != ' ' && c != '\t' {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
i++
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// unicode case
|
||||||
|
r, size := utf8.DecodeRune(b[i:])
|
||||||
|
if !unicode.IsSpace(r) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
i += size
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package swag
|
||||||
|
|
||||||
|
import "unsafe"
|
||||||
|
|
||||||
|
type internalString struct {
|
||||||
|
Data unsafe.Pointer
|
||||||
|
Len int
|
||||||
|
}
|
||||||
|
|
||||||
|
// hackStringBytes returns the (unsafe) underlying bytes slice of a string.
|
||||||
|
func hackStringBytes(str string) []byte {
|
||||||
|
p := (*internalString)(unsafe.Pointer(&str)).Data
|
||||||
|
return unsafe.Slice((*byte)(p), len(str))
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* go1.20 version (for when go mod moves to a go1.20 requirement):
|
||||||
|
|
||||||
|
func hackStringBytes(str string) []byte {
|
||||||
|
return unsafe.Slice(unsafe.StringData(str), len(str))
|
||||||
|
}
|
||||||
|
*/
|
|
@ -18,76 +18,25 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
)
|
)
|
||||||
|
|
||||||
// commonInitialisms are common acronyms that are kept as whole uppercased words.
|
|
||||||
var commonInitialisms *indexOfInitialisms
|
|
||||||
|
|
||||||
// initialisms is a slice of sorted initialisms
|
|
||||||
var initialisms []string
|
|
||||||
|
|
||||||
var isInitialism func(string) bool
|
|
||||||
|
|
||||||
// GoNamePrefixFunc sets an optional rule to prefix go names
|
// GoNamePrefixFunc sets an optional rule to prefix go names
|
||||||
// which do not start with a letter.
|
// which do not start with a letter.
|
||||||
//
|
//
|
||||||
|
// The prefix function is assumed to return a string that starts with an upper case letter.
|
||||||
|
//
|
||||||
// e.g. to help convert "123" into "{prefix}123"
|
// e.g. to help convert "123" into "{prefix}123"
|
||||||
//
|
//
|
||||||
// The default is to prefix with "X"
|
// The default is to prefix with "X"
|
||||||
var GoNamePrefixFunc func(string) string
|
var GoNamePrefixFunc func(string) string
|
||||||
|
|
||||||
func init() {
|
func prefixFunc(name, in string) string {
|
||||||
// Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769
|
if GoNamePrefixFunc == nil {
|
||||||
var configuredInitialisms = map[string]bool{
|
return "X" + in
|
||||||
"ACL": true,
|
|
||||||
"API": true,
|
|
||||||
"ASCII": true,
|
|
||||||
"CPU": true,
|
|
||||||
"CSS": true,
|
|
||||||
"DNS": true,
|
|
||||||
"EOF": true,
|
|
||||||
"GUID": true,
|
|
||||||
"HTML": true,
|
|
||||||
"HTTPS": true,
|
|
||||||
"HTTP": true,
|
|
||||||
"ID": true,
|
|
||||||
"IP": true,
|
|
||||||
"IPv4": true,
|
|
||||||
"IPv6": true,
|
|
||||||
"JSON": true,
|
|
||||||
"LHS": true,
|
|
||||||
"OAI": true,
|
|
||||||
"QPS": true,
|
|
||||||
"RAM": true,
|
|
||||||
"RHS": true,
|
|
||||||
"RPC": true,
|
|
||||||
"SLA": true,
|
|
||||||
"SMTP": true,
|
|
||||||
"SQL": true,
|
|
||||||
"SSH": true,
|
|
||||||
"TCP": true,
|
|
||||||
"TLS": true,
|
|
||||||
"TTL": true,
|
|
||||||
"UDP": true,
|
|
||||||
"UI": true,
|
|
||||||
"UID": true,
|
|
||||||
"UUID": true,
|
|
||||||
"URI": true,
|
|
||||||
"URL": true,
|
|
||||||
"UTF8": true,
|
|
||||||
"VM": true,
|
|
||||||
"XML": true,
|
|
||||||
"XMPP": true,
|
|
||||||
"XSRF": true,
|
|
||||||
"XSS": true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// a thread-safe index of initialisms
|
return GoNamePrefixFunc(name) + in
|
||||||
commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms)
|
|
||||||
initialisms = commonInitialisms.sorted()
|
|
||||||
|
|
||||||
// a test function
|
|
||||||
isInitialism = commonInitialisms.isInitialism
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -156,22 +105,6 @@ func SplitByFormat(data, format string) []string {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
type byInitialism []string
|
|
||||||
|
|
||||||
func (s byInitialism) Len() int {
|
|
||||||
return len(s)
|
|
||||||
}
|
|
||||||
func (s byInitialism) Swap(i, j int) {
|
|
||||||
s[i], s[j] = s[j], s[i]
|
|
||||||
}
|
|
||||||
func (s byInitialism) Less(i, j int) bool {
|
|
||||||
if len(s[i]) != len(s[j]) {
|
|
||||||
return len(s[i]) < len(s[j])
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings.Compare(s[i], s[j]) > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Removes leading whitespaces
|
// Removes leading whitespaces
|
||||||
func trim(str string) string {
|
func trim(str string) string {
|
||||||
return strings.TrimSpace(str)
|
return strings.TrimSpace(str)
|
||||||
|
@ -188,15 +121,20 @@ func lower(str string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Camelize an uppercased word
|
// Camelize an uppercased word
|
||||||
func Camelize(word string) (camelized string) {
|
func Camelize(word string) string {
|
||||||
|
camelized := poolOfBuffers.BorrowBuffer(len(word))
|
||||||
|
defer func() {
|
||||||
|
poolOfBuffers.RedeemBuffer(camelized)
|
||||||
|
}()
|
||||||
|
|
||||||
for pos, ru := range []rune(word) {
|
for pos, ru := range []rune(word) {
|
||||||
if pos > 0 {
|
if pos > 0 {
|
||||||
camelized += string(unicode.ToLower(ru))
|
camelized.WriteRune(unicode.ToLower(ru))
|
||||||
} else {
|
} else {
|
||||||
camelized += string(unicode.ToUpper(ru))
|
camelized.WriteRune(unicode.ToUpper(ru))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return camelized.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToFileName lowercases and underscores a go type name
|
// ToFileName lowercases and underscores a go type name
|
||||||
|
@ -224,26 +162,31 @@ func ToCommandName(name string) string {
|
||||||
|
|
||||||
// ToHumanNameLower represents a code name as a human series of words
|
// ToHumanNameLower represents a code name as a human series of words
|
||||||
func ToHumanNameLower(name string) string {
|
func ToHumanNameLower(name string) string {
|
||||||
in := newSplitter(withPostSplitInitialismCheck).split(name)
|
s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck)
|
||||||
out := make([]string, 0, len(in))
|
in := s.split(name)
|
||||||
|
poolOfSplitters.RedeemSplitter(s)
|
||||||
|
out := make([]string, 0, len(*in))
|
||||||
|
|
||||||
for _, w := range in {
|
for _, w := range *in {
|
||||||
if !w.IsInitialism() {
|
if !w.IsInitialism() {
|
||||||
out = append(out, lower(w.GetOriginal()))
|
out = append(out, lower(w.GetOriginal()))
|
||||||
} else {
|
} else {
|
||||||
out = append(out, trim(w.GetOriginal()))
|
out = append(out, trim(w.GetOriginal()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
poolOfLexems.RedeemLexems(in)
|
||||||
|
|
||||||
return strings.Join(out, " ")
|
return strings.Join(out, " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToHumanNameTitle represents a code name as a human series of words with the first letters titleized
|
// ToHumanNameTitle represents a code name as a human series of words with the first letters titleized
|
||||||
func ToHumanNameTitle(name string) string {
|
func ToHumanNameTitle(name string) string {
|
||||||
in := newSplitter(withPostSplitInitialismCheck).split(name)
|
s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck)
|
||||||
|
in := s.split(name)
|
||||||
|
poolOfSplitters.RedeemSplitter(s)
|
||||||
|
|
||||||
out := make([]string, 0, len(in))
|
out := make([]string, 0, len(*in))
|
||||||
for _, w := range in {
|
for _, w := range *in {
|
||||||
original := trim(w.GetOriginal())
|
original := trim(w.GetOriginal())
|
||||||
if !w.IsInitialism() {
|
if !w.IsInitialism() {
|
||||||
out = append(out, Camelize(original))
|
out = append(out, Camelize(original))
|
||||||
|
@ -251,6 +194,8 @@ func ToHumanNameTitle(name string) string {
|
||||||
out = append(out, original)
|
out = append(out, original)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
poolOfLexems.RedeemLexems(in)
|
||||||
|
|
||||||
return strings.Join(out, " ")
|
return strings.Join(out, " ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,35 +228,70 @@ func ToVarName(name string) string {
|
||||||
|
|
||||||
// ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes
|
// ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes
|
||||||
func ToGoName(name string) string {
|
func ToGoName(name string) string {
|
||||||
lexems := newSplitter(withPostSplitInitialismCheck).split(name)
|
s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck)
|
||||||
|
lexems := s.split(name)
|
||||||
|
poolOfSplitters.RedeemSplitter(s)
|
||||||
|
defer func() {
|
||||||
|
poolOfLexems.RedeemLexems(lexems)
|
||||||
|
}()
|
||||||
|
lexemes := *lexems
|
||||||
|
|
||||||
result := ""
|
if len(lexemes) == 0 {
|
||||||
for _, lexem := range lexems {
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
result := poolOfBuffers.BorrowBuffer(len(name))
|
||||||
|
defer func() {
|
||||||
|
poolOfBuffers.RedeemBuffer(result)
|
||||||
|
}()
|
||||||
|
|
||||||
|
// check if not starting with a letter, upper case
|
||||||
|
firstPart := lexemes[0].GetUnsafeGoName()
|
||||||
|
if lexemes[0].IsInitialism() {
|
||||||
|
firstPart = upper(firstPart)
|
||||||
|
}
|
||||||
|
|
||||||
|
if c := firstPart[0]; c < utf8.RuneSelf {
|
||||||
|
// ASCII
|
||||||
|
switch {
|
||||||
|
case 'A' <= c && c <= 'Z':
|
||||||
|
result.WriteString(firstPart)
|
||||||
|
case 'a' <= c && c <= 'z':
|
||||||
|
result.WriteByte(c - 'a' + 'A')
|
||||||
|
result.WriteString(firstPart[1:])
|
||||||
|
default:
|
||||||
|
result.WriteString(prefixFunc(name, firstPart))
|
||||||
|
// NOTE: no longer check if prefixFunc returns a string that starts with uppercase:
|
||||||
|
// assume this is always the case
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// unicode
|
||||||
|
firstRune, _ := utf8.DecodeRuneInString(firstPart)
|
||||||
|
switch {
|
||||||
|
case !unicode.IsLetter(firstRune):
|
||||||
|
result.WriteString(prefixFunc(name, firstPart))
|
||||||
|
case !unicode.IsUpper(firstRune):
|
||||||
|
result.WriteString(prefixFunc(name, firstPart))
|
||||||
|
/*
|
||||||
|
result.WriteRune(unicode.ToUpper(firstRune))
|
||||||
|
result.WriteString(firstPart[offset:])
|
||||||
|
*/
|
||||||
|
default:
|
||||||
|
result.WriteString(firstPart)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, lexem := range lexemes[1:] {
|
||||||
goName := lexem.GetUnsafeGoName()
|
goName := lexem.GetUnsafeGoName()
|
||||||
|
|
||||||
// to support old behavior
|
// to support old behavior
|
||||||
if lexem.IsInitialism() {
|
if lexem.IsInitialism() {
|
||||||
goName = upper(goName)
|
goName = upper(goName)
|
||||||
}
|
}
|
||||||
result += goName
|
result.WriteString(goName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(result) > 0 {
|
return result.String()
|
||||||
// Only prefix with X when the first character isn't an ascii letter
|
|
||||||
first := []rune(result)[0]
|
|
||||||
if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) {
|
|
||||||
if GoNamePrefixFunc == nil {
|
|
||||||
return "X" + result
|
|
||||||
}
|
|
||||||
result = GoNamePrefixFunc(name) + result
|
|
||||||
}
|
|
||||||
first = []rune(result)[0]
|
|
||||||
if unicode.IsLetter(first) && !unicode.IsUpper(first) {
|
|
||||||
result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainsStrings searches a slice of strings for a case-sensitive match
|
// ContainsStrings searches a slice of strings for a case-sensitive match
|
||||||
|
@ -376,16 +356,6 @@ func IsZero(data interface{}) bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddInitialisms add additional initialisms
|
|
||||||
func AddInitialisms(words ...string) {
|
|
||||||
for _, word := range words {
|
|
||||||
// commonInitialisms[upper(word)] = true
|
|
||||||
commonInitialisms.add(upper(word))
|
|
||||||
}
|
|
||||||
// sort again
|
|
||||||
initialisms = commonInitialisms.sorted()
|
|
||||||
}
|
|
||||||
|
|
||||||
// CommandLineOptionsGroup represents a group of user-defined command line options
|
// CommandLineOptionsGroup represents a group of user-defined command line options
|
||||||
type CommandLineOptionsGroup struct {
|
type CommandLineOptionsGroup struct {
|
||||||
ShortDescription string
|
ShortDescription string
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
|
## 2.20.1
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- make BeSpecEvent duration matcher more forgiving [d6f9640]
|
||||||
|
|
||||||
|
## 2.20.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- Add buildvcs flag [be5ab95]
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
- Add update-deps to makefile [d303d14]
|
||||||
|
- bump all dependencies [7a50221]
|
||||||
|
|
||||||
|
## 2.19.1
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- update supported platforms for race conditions [63c8c30]
|
||||||
|
- [build] Allow custom name for binaries. [ff41e27]
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
- bump gomega [76f4e0c]
|
||||||
|
- Bump rexml from 3.2.6 to 3.2.8 in /docs (#1417) [b69c00d]
|
||||||
|
- Bump golang.org/x/sys from 0.20.0 to 0.21.0 (#1425) [f097741]
|
||||||
|
|
||||||
## 2.19.0
|
## 2.19.0
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -4,8 +4,13 @@ all: vet test
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go run github.com/onsi/ginkgo/v2/ginkgo -r -p
|
go run github.com/onsi/ginkgo/v2/ginkgo -r -p -randomize-all -keep-going
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet:
|
vet:
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
|
.PHONY: update-deps
|
||||||
|
update-deps:
|
||||||
|
go get -u ./...
|
||||||
|
go mod tidy
|
|
@ -2,6 +2,8 @@ package build
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo/v2/ginkgo/command"
|
"github.com/onsi/ginkgo/v2/ginkgo/command"
|
||||||
"github.com/onsi/ginkgo/v2/ginkgo/internal"
|
"github.com/onsi/ginkgo/v2/ginkgo/internal"
|
||||||
|
@ -53,7 +55,18 @@ func buildSpecs(args []string, cliConfig types.CLIConfig, goFlagsConfig types.Go
|
||||||
if suite.State.Is(internal.TestSuiteStateFailedToCompile) {
|
if suite.State.Is(internal.TestSuiteStateFailedToCompile) {
|
||||||
fmt.Println(suite.CompilationError.Error())
|
fmt.Println(suite.CompilationError.Error())
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("Compiled %s.test\n", suite.PackageName)
|
if len(goFlagsConfig.O) == 0 {
|
||||||
|
goFlagsConfig.O = path.Join(suite.Path, suite.PackageName+".test")
|
||||||
|
} else {
|
||||||
|
stat, err := os.Stat(goFlagsConfig.O)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
if stat.IsDir() {
|
||||||
|
goFlagsConfig.O += "/" + suite.PackageName + ".test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fmt.Printf("Compiled %s\n", goFlagsConfig.O)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,18 @@ func CompileSuite(suite TestSuite, goFlagsConfig types.GoFlagsConfig) TestSuite
|
||||||
return suite
|
return suite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(goFlagsConfig.O) > 0 {
|
||||||
|
userDefinedPath, err := filepath.Abs(goFlagsConfig.O)
|
||||||
|
if err != nil {
|
||||||
|
suite.State = TestSuiteStateFailedToCompile
|
||||||
|
suite.CompilationError = fmt.Errorf("Failed to compute compilation target path %s:\n%s", goFlagsConfig.O, err.Error())
|
||||||
|
return suite
|
||||||
|
}
|
||||||
|
path = userDefinedPath
|
||||||
|
}
|
||||||
|
|
||||||
|
goFlagsConfig.O = path
|
||||||
|
|
||||||
ginkgoInvocationPath, _ := os.Getwd()
|
ginkgoInvocationPath, _ := os.Getwd()
|
||||||
ginkgoInvocationPath, _ = filepath.Abs(ginkgoInvocationPath)
|
ginkgoInvocationPath, _ = filepath.Abs(ginkgoInvocationPath)
|
||||||
packagePath := suite.AbsPath()
|
packagePath := suite.AbsPath()
|
||||||
|
@ -34,7 +46,7 @@ func CompileSuite(suite TestSuite, goFlagsConfig types.GoFlagsConfig) TestSuite
|
||||||
suite.CompilationError = fmt.Errorf("Failed to get relative path from package to the current working directory:\n%s", err.Error())
|
suite.CompilationError = fmt.Errorf("Failed to get relative path from package to the current working directory:\n%s", err.Error())
|
||||||
return suite
|
return suite
|
||||||
}
|
}
|
||||||
args, err := types.GenerateGoTestCompileArgs(goFlagsConfig, path, "./", pathToInvocationPath)
|
args, err := types.GenerateGoTestCompileArgs(goFlagsConfig, "./", pathToInvocationPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
suite.State = TestSuiteStateFailedToCompile
|
suite.State = TestSuiteStateFailedToCompile
|
||||||
suite.CompilationError = fmt.Errorf("Failed to generate go test compile flags:\n%s", err.Error())
|
suite.CompilationError = fmt.Errorf("Failed to generate go test compile flags:\n%s", err.Error())
|
||||||
|
|
|
@ -202,6 +202,7 @@ type GoFlagsConfig struct {
|
||||||
A bool
|
A bool
|
||||||
ASMFlags string
|
ASMFlags string
|
||||||
BuildMode string
|
BuildMode string
|
||||||
|
BuildVCS bool
|
||||||
Compiler string
|
Compiler string
|
||||||
GCCGoFlags string
|
GCCGoFlags string
|
||||||
GCFlags string
|
GCFlags string
|
||||||
|
@ -219,6 +220,7 @@ type GoFlagsConfig struct {
|
||||||
ToolExec string
|
ToolExec string
|
||||||
Work bool
|
Work bool
|
||||||
X bool
|
X bool
|
||||||
|
O string
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDefaultGoFlagsConfig() GoFlagsConfig {
|
func NewDefaultGoFlagsConfig() GoFlagsConfig {
|
||||||
|
@ -511,7 +513,7 @@ var GinkgoCLIWatchFlags = GinkgoFlags{
|
||||||
// GoBuildFlags provides flags for the Ginkgo CLI build, run, and watch commands that capture go's build-time flags. These are passed to go test -c by the ginkgo CLI
|
// GoBuildFlags provides flags for the Ginkgo CLI build, run, and watch commands that capture go's build-time flags. These are passed to go test -c by the ginkgo CLI
|
||||||
var GoBuildFlags = GinkgoFlags{
|
var GoBuildFlags = GinkgoFlags{
|
||||||
{KeyPath: "Go.Race", Name: "race", SectionKey: "code-and-coverage-analysis",
|
{KeyPath: "Go.Race", Name: "race", SectionKey: "code-and-coverage-analysis",
|
||||||
Usage: "enable data race detection. Supported only on linux/amd64, freebsd/amd64, darwin/amd64, windows/amd64, linux/ppc64le and linux/arm64 (only for 48-bit VMA)."},
|
Usage: "enable data race detection. Supported on linux/amd64, linux/ppc64le, linux/arm64, linux/s390x, freebsd/amd64, netbsd/amd64, darwin/amd64, darwin/arm64, and windows/amd64."},
|
||||||
{KeyPath: "Go.Vet", Name: "vet", UsageArgument: "list", SectionKey: "code-and-coverage-analysis",
|
{KeyPath: "Go.Vet", Name: "vet", UsageArgument: "list", SectionKey: "code-and-coverage-analysis",
|
||||||
Usage: `Configure the invocation of "go vet" during "go test" to use the comma-separated list of vet checks. If list is empty, "go test" runs "go vet" with a curated list of checks believed to be always worth addressing. If list is "off", "go test" does not run "go vet" at all. Available checks can be found by running 'go doc cmd/vet'`},
|
Usage: `Configure the invocation of "go vet" during "go test" to use the comma-separated list of vet checks. If list is empty, "go test" runs "go vet" with a curated list of checks believed to be always worth addressing. If list is "off", "go test" does not run "go vet" at all. Available checks can be found by running 'go doc cmd/vet'`},
|
||||||
{KeyPath: "Go.Cover", Name: "cover", SectionKey: "code-and-coverage-analysis",
|
{KeyPath: "Go.Cover", Name: "cover", SectionKey: "code-and-coverage-analysis",
|
||||||
|
@ -527,6 +529,8 @@ var GoBuildFlags = GinkgoFlags{
|
||||||
Usage: "arguments to pass on each go tool asm invocation."},
|
Usage: "arguments to pass on each go tool asm invocation."},
|
||||||
{KeyPath: "Go.BuildMode", Name: "buildmode", UsageArgument: "mode", SectionKey: "go-build",
|
{KeyPath: "Go.BuildMode", Name: "buildmode", UsageArgument: "mode", SectionKey: "go-build",
|
||||||
Usage: "build mode to use. See 'go help buildmode' for more."},
|
Usage: "build mode to use. See 'go help buildmode' for more."},
|
||||||
|
{KeyPath: "Go.BuildVCS", Name: "buildvcs", SectionKey: "go-build",
|
||||||
|
Usage: "adds version control information."},
|
||||||
{KeyPath: "Go.Compiler", Name: "compiler", UsageArgument: "name", SectionKey: "go-build",
|
{KeyPath: "Go.Compiler", Name: "compiler", UsageArgument: "name", SectionKey: "go-build",
|
||||||
Usage: "name of compiler to use, as in runtime.Compiler (gccgo or gc)."},
|
Usage: "name of compiler to use, as in runtime.Compiler (gccgo or gc)."},
|
||||||
{KeyPath: "Go.GCCGoFlags", Name: "gccgoflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build",
|
{KeyPath: "Go.GCCGoFlags", Name: "gccgoflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build",
|
||||||
|
@ -561,6 +565,8 @@ var GoBuildFlags = GinkgoFlags{
|
||||||
Usage: "print the name of the temporary work directory and do not delete it when exiting."},
|
Usage: "print the name of the temporary work directory and do not delete it when exiting."},
|
||||||
{KeyPath: "Go.X", Name: "x", SectionKey: "go-build",
|
{KeyPath: "Go.X", Name: "x", SectionKey: "go-build",
|
||||||
Usage: "print the commands."},
|
Usage: "print the commands."},
|
||||||
|
{KeyPath: "Go.O", Name: "o", SectionKey: "go-build",
|
||||||
|
Usage: "output binary path (including name)."},
|
||||||
}
|
}
|
||||||
|
|
||||||
// GoRunFlags provides flags for the Ginkgo CLI run, and watch commands that capture go's run-time flags. These are passed to the compiled test binary by the ginkgo CLI
|
// GoRunFlags provides flags for the Ginkgo CLI run, and watch commands that capture go's run-time flags. These are passed to the compiled test binary by the ginkgo CLI
|
||||||
|
@ -614,7 +620,7 @@ func VetAndInitializeCLIAndGoConfig(cliConfig CLIConfig, goFlagsConfig GoFlagsCo
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateGoTestCompileArgs is used by the Ginkgo CLI to generate command line arguments to pass to the go test -c command when compiling the test
|
// GenerateGoTestCompileArgs is used by the Ginkgo CLI to generate command line arguments to pass to the go test -c command when compiling the test
|
||||||
func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, destination string, packageToBuild string, pathToInvocationPath string) ([]string, error) {
|
func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, packageToBuild string, pathToInvocationPath string) ([]string, error) {
|
||||||
// if the user has set the CoverProfile run-time flag make sure to set the build-time cover flag to make sure
|
// if the user has set the CoverProfile run-time flag make sure to set the build-time cover flag to make sure
|
||||||
// the built test binary can generate a coverprofile
|
// the built test binary can generate a coverprofile
|
||||||
if goFlagsConfig.CoverProfile != "" {
|
if goFlagsConfig.CoverProfile != "" {
|
||||||
|
@ -637,7 +643,7 @@ func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, destination string,
|
||||||
goFlagsConfig.CoverPkg = strings.Join(adjustedCoverPkgs, ",")
|
goFlagsConfig.CoverPkg = strings.Join(adjustedCoverPkgs, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
args := []string{"test", "-c", "-o", destination, packageToBuild}
|
args := []string{"test", "-c", packageToBuild}
|
||||||
goArgs, err := GenerateFlagArgs(
|
goArgs, err := GenerateFlagArgs(
|
||||||
GoBuildFlags,
|
GoBuildFlags,
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
package types
|
package types
|
||||||
|
|
||||||
const VERSION = "2.19.0"
|
const VERSION = "2.20.1"
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
## 1.34.1
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
- Use slices from exp/slices to keep golang 1.20 compat [5e71dcd]
|
||||||
|
|
||||||
|
## 1.34.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- Add RoundTripper method to ghttp.Server [c549e0d]
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- fix incorrect handling of nil slices in HaveExactElements (fixes #771) [878940c]
|
||||||
|
- issue_765 - fixed bug in Hopcroft-Karp algorithm [ebadb67]
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
- bump ginkgo [8af2ece]
|
||||||
|
- Fix typo in docs [123a071]
|
||||||
|
- Bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 (#756) [0e69083]
|
||||||
|
- Bump google.golang.org/protobuf from 1.33.0 to 1.34.1 (#755) [2675796]
|
||||||
|
- Bump golang.org/x/net from 0.24.0 to 0.25.0 (#754) [4160c0f]
|
||||||
|
- Bump github-pages from 230 to 231 in /docs (#748) [892c303]
|
||||||
|
|
||||||
## 1.33.1
|
## 1.33.1
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"github.com/onsi/gomega/types"
|
"github.com/onsi/gomega/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
const GOMEGA_VERSION = "1.33.1"
|
const GOMEGA_VERSION = "1.34.1"
|
||||||
|
|
||||||
const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler.
|
const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler.
|
||||||
If you're using Ginkgo then you probably forgot to put your assertion in an It().
|
If you're using Ginkgo then you probably forgot to put your assertion in an It().
|
||||||
|
|
|
@ -30,15 +30,18 @@ func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool
|
||||||
|
|
||||||
lenMatchers := len(matchers)
|
lenMatchers := len(matchers)
|
||||||
lenValues := len(values)
|
lenValues := len(values)
|
||||||
|
success = true
|
||||||
|
|
||||||
for i := 0; i < lenMatchers || i < lenValues; i++ {
|
for i := 0; i < lenMatchers || i < lenValues; i++ {
|
||||||
if i >= lenMatchers {
|
if i >= lenMatchers {
|
||||||
matcher.extraIndex = i
|
matcher.extraIndex = i
|
||||||
|
success = false
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if i >= lenValues {
|
if i >= lenValues {
|
||||||
matcher.missingIndex = i
|
matcher.missingIndex = i
|
||||||
|
success = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,15 +52,17 @@ func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool
|
||||||
index: i,
|
index: i,
|
||||||
failure: err.Error(),
|
failure: err.Error(),
|
||||||
})
|
})
|
||||||
|
success = false
|
||||||
} else if !match {
|
} else if !match {
|
||||||
matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{
|
matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{
|
||||||
index: i,
|
index: i,
|
||||||
failure: elemMatcher.FailureMessage(values[i]),
|
failure: elemMatcher.FailureMessage(values[i]),
|
||||||
})
|
})
|
||||||
|
success = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return matcher.missingIndex+matcher.extraIndex+len(matcher.mismatchFailures) == 0, nil
|
return success, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (message string) {
|
func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (message string) {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package bipartitegraph
|
package bipartitegraph
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"golang.org/x/exp/slices"
|
||||||
|
|
||||||
. "github.com/onsi/gomega/matchers/support/goraph/edge"
|
. "github.com/onsi/gomega/matchers/support/goraph/edge"
|
||||||
. "github.com/onsi/gomega/matchers/support/goraph/node"
|
. "github.com/onsi/gomega/matchers/support/goraph/node"
|
||||||
"github.com/onsi/gomega/matchers/support/goraph/util"
|
"github.com/onsi/gomega/matchers/support/goraph/util"
|
||||||
|
@ -157,6 +159,11 @@ func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers [
|
||||||
if len(currentLayer) == 0 {
|
if len(currentLayer) == 0 {
|
||||||
return []NodeOrderedSet{}
|
return []NodeOrderedSet{}
|
||||||
}
|
}
|
||||||
|
if done { // if last layer - into last layer must be only 'free' nodes
|
||||||
|
currentLayer = slices.DeleteFunc(currentLayer, func(in Node) bool {
|
||||||
|
return !matching.Free(in)
|
||||||
|
})
|
||||||
|
}
|
||||||
guideLayers = append(guideLayers, currentLayer)
|
guideLayers = append(guideLayers, currentLayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctxErr := waitFunc(ctx, delay); ctxErr != nil {
|
if ctxErr := waitFunc(ctx, delay); ctxErr != nil {
|
||||||
return fmt.Errorf("%w: %s", ctxErr, err)
|
return fmt.Errorf("%w: %w", ctxErr, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
generated
vendored
|
@ -59,8 +59,9 @@ func WithInsecure() Option {
|
||||||
//
|
//
|
||||||
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
// environment variable is set, and this option is not passed, that variable
|
// environment variable is set, and this option is not passed, that variable
|
||||||
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
// value will be used. If both environment variables are set,
|
||||||
// will take precedence.
|
// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment
|
||||||
|
// variable is set, and this option is passed, this option will take precedence.
|
||||||
//
|
//
|
||||||
// If both this option and WithEndpointURL are used, the last used option will
|
// If both this option and WithEndpointURL are used, the last used option will
|
||||||
// take precedence.
|
// take precedence.
|
||||||
|
@ -79,8 +80,9 @@ func WithEndpoint(endpoint string) Option {
|
||||||
//
|
//
|
||||||
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
||||||
// environment variable is set, and this option is not passed, that variable
|
// environment variable is set, and this option is not passed, that variable
|
||||||
// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
// value will be used. If both environment variables are set,
|
||||||
// will take precedence.
|
// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment
|
||||||
|
// variable is set, and this option is passed, this option will take precedence.
|
||||||
//
|
//
|
||||||
// If both this option and WithEndpoint are used, the last used option will
|
// If both this option and WithEndpoint are used, the last used option will
|
||||||
// take precedence.
|
// take precedence.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// Package asn1 contains supporting types for parsing and building ASN.1
|
// Package asn1 contains supporting types for parsing and building ASN.1
|
||||||
// messages with the cryptobyte package.
|
// messages with the cryptobyte package.
|
||||||
package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
|
package asn1
|
||||||
|
|
||||||
// Tag represents an ASN.1 identifier octet, consisting of a tag number
|
// Tag represents an ASN.1 identifier octet, consisting of a tag number
|
||||||
// (indicating a type) and class (such as context-specific or constructed).
|
// (indicating a type) and class (such as context-specific or constructed).
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//
|
//
|
||||||
// See the documentation and examples for the Builder and String types to get
|
// See the documentation and examples for the Builder and String types to get
|
||||||
// started.
|
// started.
|
||||||
package cryptobyte // import "golang.org/x/crypto/cryptobyte"
|
package cryptobyte
|
||||||
|
|
||||||
// String represents a string of bytes. It provides methods for parsing
|
// String represents a string of bytes. It provides methods for parsing
|
||||||
// fixed-length and length-prefixed values from it.
|
// fixed-length and length-prefixed values from it.
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
// operations with the same key more efficient. This package refers to the RFC
|
// operations with the same key more efficient. This package refers to the RFC
|
||||||
// 8032 private key as the “seed”.
|
// 8032 private key as the “seed”.
|
||||||
//
|
//
|
||||||
// Beginning with Go 1.13, the functionality of this package was moved to the
|
// This package is a wrapper around the standard library crypto/ed25519 package.
|
||||||
// standard library as crypto/ed25519. This package only acts as a compatibility
|
|
||||||
// wrapper.
|
|
||||||
package ed25519
|
package ed25519
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// HKDF is a cryptographic key derivation function (KDF) with the goal of
|
// HKDF is a cryptographic key derivation function (KDF) with the goal of
|
||||||
// expanding limited input keying material into one or more cryptographically
|
// expanding limited input keying material into one or more cryptographically
|
||||||
// strong secret keys.
|
// strong secret keys.
|
||||||
package hkdf // import "golang.org/x/crypto/hkdf"
|
package hkdf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
|
|
|
@ -32,7 +32,7 @@ chunk size.
|
||||||
|
|
||||||
This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
|
This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
|
||||||
*/
|
*/
|
||||||
package secretbox // import "golang.org/x/crypto/nacl/secretbox"
|
package secretbox
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.org/x/crypto/internal/alias"
|
"golang.org/x/crypto/internal/alias"
|
||||||
|
|
|
@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
|
||||||
choose, you can pass the `New` functions from the different SHA packages to
|
choose, you can pass the `New` functions from the different SHA packages to
|
||||||
pbkdf2.Key.
|
pbkdf2.Key.
|
||||||
*/
|
*/
|
||||||
package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
|
package pbkdf2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Package salsa provides low-level access to functions in the Salsa family.
|
// Package salsa provides low-level access to functions in the Salsa family.
|
||||||
package salsa // import "golang.org/x/crypto/salsa20/salsa"
|
package salsa
|
||||||
|
|
||||||
import "math/bits"
|
import "math/bits"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -209,25 +209,37 @@ func Insert[S ~[]E, E any](s S, i int, v ...E) S {
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete removes the elements s[i:j] from s, returning the modified slice.
|
// clearSlice sets all elements up to the length of s to the zero value of E.
|
||||||
// Delete panics if s[i:j] is not a valid slice of s.
|
// We may use the builtin clear func instead, and remove clearSlice, when upgrading
|
||||||
// Delete is O(len(s)-j), so if many items must be deleted, it is better to
|
// to Go 1.21+.
|
||||||
// make a single call deleting them all together than to delete one at a time.
|
func clearSlice[S ~[]E, E any](s S) {
|
||||||
// Delete might not modify the elements s[len(s)-(j-i):len(s)]. If those
|
var zero E
|
||||||
// elements contain pointers you might consider zeroing those elements so that
|
for i := range s {
|
||||||
// objects they reference can be garbage collected.
|
s[i] = zero
|
||||||
func Delete[S ~[]E, E any](s S, i, j int) S {
|
}
|
||||||
_ = s[i:j] // bounds check
|
}
|
||||||
|
|
||||||
return append(s[:i], s[j:]...)
|
// Delete removes the elements s[i:j] from s, returning the modified slice.
|
||||||
|
// Delete panics if j > len(s) or s[i:j] is not a valid slice of s.
|
||||||
|
// Delete is O(len(s)-i), so if many items must be deleted, it is better to
|
||||||
|
// make a single call deleting them all together than to delete one at a time.
|
||||||
|
// Delete zeroes the elements s[len(s)-(j-i):len(s)].
|
||||||
|
func Delete[S ~[]E, E any](s S, i, j int) S {
|
||||||
|
_ = s[i:j:len(s)] // bounds check
|
||||||
|
|
||||||
|
if i == j {
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
oldlen := len(s)
|
||||||
|
s = append(s[:i], s[j:]...)
|
||||||
|
clearSlice(s[len(s):oldlen]) // zero/nil out the obsolete elements, for GC
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteFunc removes any elements from s for which del returns true,
|
// DeleteFunc removes any elements from s for which del returns true,
|
||||||
// returning the modified slice.
|
// returning the modified slice.
|
||||||
// When DeleteFunc removes m elements, it might not modify the elements
|
// DeleteFunc zeroes the elements between the new length and the original length.
|
||||||
// s[len(s)-m:len(s)]. If those elements contain pointers you might consider
|
|
||||||
// zeroing those elements so that objects they reference can be garbage
|
|
||||||
// collected.
|
|
||||||
func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S {
|
func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S {
|
||||||
i := IndexFunc(s, del)
|
i := IndexFunc(s, del)
|
||||||
if i == -1 {
|
if i == -1 {
|
||||||
|
@ -240,11 +252,13 @@ func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC
|
||||||
return s[:i]
|
return s[:i]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace replaces the elements s[i:j] by the given v, and returns the
|
// Replace replaces the elements s[i:j] by the given v, and returns the
|
||||||
// modified slice. Replace panics if s[i:j] is not a valid slice of s.
|
// modified slice. Replace panics if s[i:j] is not a valid slice of s.
|
||||||
|
// When len(v) < (j-i), Replace zeroes the elements between the new length and the original length.
|
||||||
func Replace[S ~[]E, E any](s S, i, j int, v ...E) S {
|
func Replace[S ~[]E, E any](s S, i, j int, v ...E) S {
|
||||||
_ = s[i:j] // verify that i:j is a valid subslice
|
_ = s[i:j] // verify that i:j is a valid subslice
|
||||||
|
|
||||||
|
@ -272,6 +286,7 @@ func Replace[S ~[]E, E any](s S, i, j int, v ...E) S {
|
||||||
if i+len(v) != j {
|
if i+len(v) != j {
|
||||||
copy(r[i+len(v):], s[j:])
|
copy(r[i+len(v):], s[j:])
|
||||||
}
|
}
|
||||||
|
clearSlice(s[tot:]) // zero/nil out the obsolete elements, for GC
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,9 +360,7 @@ func Clone[S ~[]E, E any](s S) S {
|
||||||
// This is like the uniq command found on Unix.
|
// This is like the uniq command found on Unix.
|
||||||
// Compact modifies the contents of the slice s and returns the modified slice,
|
// Compact modifies the contents of the slice s and returns the modified slice,
|
||||||
// which may have a smaller length.
|
// which may have a smaller length.
|
||||||
// When Compact discards m elements in total, it might not modify the elements
|
// Compact zeroes the elements between the new length and the original length.
|
||||||
// s[len(s)-m:len(s)]. If those elements contain pointers you might consider
|
|
||||||
// zeroing those elements so that objects they reference can be garbage collected.
|
|
||||||
func Compact[S ~[]E, E comparable](s S) S {
|
func Compact[S ~[]E, E comparable](s S) S {
|
||||||
if len(s) < 2 {
|
if len(s) < 2 {
|
||||||
return s
|
return s
|
||||||
|
@ -361,11 +374,13 @@ func Compact[S ~[]E, E comparable](s S) S {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC
|
||||||
return s[:i]
|
return s[:i]
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompactFunc is like [Compact] but uses an equality function to compare elements.
|
// CompactFunc is like [Compact] but uses an equality function to compare elements.
|
||||||
// For runs of elements that compare equal, CompactFunc keeps the first one.
|
// For runs of elements that compare equal, CompactFunc keeps the first one.
|
||||||
|
// CompactFunc zeroes the elements between the new length and the original length.
|
||||||
func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S {
|
func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S {
|
||||||
if len(s) < 2 {
|
if len(s) < 2 {
|
||||||
return s
|
return s
|
||||||
|
@ -379,6 +394,7 @@ func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
clearSlice(s[i:]) // zero/nil out the obsolete elements, for GC
|
||||||
return s[:i]
|
return s[:i]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,12 @@ func Sort[S ~[]E, E constraints.Ordered](x S) {
|
||||||
// SortFunc sorts the slice x in ascending order as determined by the cmp
|
// SortFunc sorts the slice x in ascending order as determined by the cmp
|
||||||
// function. This sort is not guaranteed to be stable.
|
// function. This sort is not guaranteed to be stable.
|
||||||
// cmp(a, b) should return a negative number when a < b, a positive number when
|
// cmp(a, b) should return a negative number when a < b, a positive number when
|
||||||
// a > b and zero when a == b.
|
// a > b and zero when a == b or when a is not comparable to b in the sense
|
||||||
|
// of the formal definition of Strict Weak Ordering.
|
||||||
//
|
//
|
||||||
// SortFunc requires that cmp is a strict weak ordering.
|
// SortFunc requires that cmp is a strict weak ordering.
|
||||||
// See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings.
|
// See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings.
|
||||||
|
// To indicate 'uncomparable', return 0 from the function.
|
||||||
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) {
|
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) {
|
||||||
n := len(x)
|
n := len(x)
|
||||||
pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp)
|
pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -226,8 +226,9 @@ func (x *FileSyntax) Cleanup() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if ww == 1 && len(stmt.RParen.Comments.Before) == 0 {
|
if ww == 1 && len(stmt.RParen.Comments.Before) == 0 {
|
||||||
// Collapse block into single line.
|
// Collapse block into single line but keep the Line reference used by the
|
||||||
line := &Line{
|
// parsed File structure.
|
||||||
|
*stmt.Line[0] = Line{
|
||||||
Comments: Comments{
|
Comments: Comments{
|
||||||
Before: commentsAdd(stmt.Before, stmt.Line[0].Before),
|
Before: commentsAdd(stmt.Before, stmt.Line[0].Before),
|
||||||
Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix),
|
Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix),
|
||||||
|
@ -235,7 +236,7 @@ func (x *FileSyntax) Cleanup() {
|
||||||
},
|
},
|
||||||
Token: stringsAdd(stmt.Token, stmt.Line[0].Token),
|
Token: stringsAdd(stmt.Token, stmt.Line[0].Token),
|
||||||
}
|
}
|
||||||
x.Stmt[w] = line
|
x.Stmt[w] = stmt.Line[0]
|
||||||
w++
|
w++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,10 +38,12 @@ type File struct {
|
||||||
Module *Module
|
Module *Module
|
||||||
Go *Go
|
Go *Go
|
||||||
Toolchain *Toolchain
|
Toolchain *Toolchain
|
||||||
|
Godebug []*Godebug
|
||||||
Require []*Require
|
Require []*Require
|
||||||
Exclude []*Exclude
|
Exclude []*Exclude
|
||||||
Replace []*Replace
|
Replace []*Replace
|
||||||
Retract []*Retract
|
Retract []*Retract
|
||||||
|
Tool []*Tool
|
||||||
|
|
||||||
Syntax *FileSyntax
|
Syntax *FileSyntax
|
||||||
}
|
}
|
||||||
|
@ -65,6 +67,13 @@ type Toolchain struct {
|
||||||
Syntax *Line
|
Syntax *Line
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A Godebug is a single godebug key=value statement.
|
||||||
|
type Godebug struct {
|
||||||
|
Key string
|
||||||
|
Value string
|
||||||
|
Syntax *Line
|
||||||
|
}
|
||||||
|
|
||||||
// An Exclude is a single exclude statement.
|
// An Exclude is a single exclude statement.
|
||||||
type Exclude struct {
|
type Exclude struct {
|
||||||
Mod module.Version
|
Mod module.Version
|
||||||
|
@ -85,6 +94,12 @@ type Retract struct {
|
||||||
Syntax *Line
|
Syntax *Line
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A Tool is a single tool statement.
|
||||||
|
type Tool struct {
|
||||||
|
Path string
|
||||||
|
Syntax *Line
|
||||||
|
}
|
||||||
|
|
||||||
// A VersionInterval represents a range of versions with upper and lower bounds.
|
// A VersionInterval represents a range of versions with upper and lower bounds.
|
||||||
// Intervals are closed: both bounds are included. When Low is equal to High,
|
// Intervals are closed: both bounds are included. When Low is equal to High,
|
||||||
// the interval may refer to a single version ('v1.2.3') or an interval
|
// the interval may refer to a single version ('v1.2.3') or an interval
|
||||||
|
@ -289,7 +304,7 @@ func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (parse
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
case "module", "require", "exclude", "replace", "retract":
|
case "module", "godebug", "require", "exclude", "replace", "retract", "tool":
|
||||||
for _, l := range x.Line {
|
for _, l := range x.Line {
|
||||||
f.add(&errs, x, l, x.Token[0], l.Token, fix, strict)
|
f.add(&errs, x, l, x.Token[0], l.Token, fix, strict)
|
||||||
}
|
}
|
||||||
|
@ -308,7 +323,9 @@ var laxGoVersionRE = lazyregexp.New(`^v?(([1-9][0-9]*)\.(0|[1-9][0-9]*))([^0-9].
|
||||||
|
|
||||||
// Toolchains must be named beginning with `go1`,
|
// Toolchains must be named beginning with `go1`,
|
||||||
// like "go1.20.3" or "go1.20.3-gccgo". As a special case, "default" is also permitted.
|
// like "go1.20.3" or "go1.20.3-gccgo". As a special case, "default" is also permitted.
|
||||||
// TODO(samthanawalla): Replace regex with https://pkg.go.dev/go/version#IsValid in 1.23+
|
// Note that this regexp is a much looser condition than go/version.IsValid,
|
||||||
|
// for forward compatibility.
|
||||||
|
// (This code has to be work to identify new toolchains even if we tweak the syntax in the future.)
|
||||||
var ToolchainRE = lazyregexp.New(`^default$|^go1($|\.)`)
|
var ToolchainRE = lazyregexp.New(`^default$|^go1($|\.)`)
|
||||||
|
|
||||||
func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, args []string, fix VersionFixer, strict bool) {
|
func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, args []string, fix VersionFixer, strict bool) {
|
||||||
|
@ -384,7 +401,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
|
||||||
if len(args) != 1 {
|
if len(args) != 1 {
|
||||||
errorf("toolchain directive expects exactly one argument")
|
errorf("toolchain directive expects exactly one argument")
|
||||||
return
|
return
|
||||||
} else if strict && !ToolchainRE.MatchString(args[0]) {
|
} else if !ToolchainRE.MatchString(args[0]) {
|
||||||
errorf("invalid toolchain version '%s': must match format go1.23.0 or default", args[0])
|
errorf("invalid toolchain version '%s': must match format go1.23.0 or default", args[0])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -412,6 +429,22 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
|
||||||
}
|
}
|
||||||
f.Module.Mod = module.Version{Path: s}
|
f.Module.Mod = module.Version{Path: s}
|
||||||
|
|
||||||
|
case "godebug":
|
||||||
|
if len(args) != 1 || strings.ContainsAny(args[0], "\"`',") {
|
||||||
|
errorf("usage: godebug key=value")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
key, value, ok := strings.Cut(args[0], "=")
|
||||||
|
if !ok {
|
||||||
|
errorf("usage: godebug key=value")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
f.Godebug = append(f.Godebug, &Godebug{
|
||||||
|
Key: key,
|
||||||
|
Value: value,
|
||||||
|
Syntax: line,
|
||||||
|
})
|
||||||
|
|
||||||
case "require", "exclude":
|
case "require", "exclude":
|
||||||
if len(args) != 2 {
|
if len(args) != 2 {
|
||||||
errorf("usage: %s module/path v1.2.3", verb)
|
errorf("usage: %s module/path v1.2.3", verb)
|
||||||
|
@ -483,6 +516,21 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
|
||||||
Syntax: line,
|
Syntax: line,
|
||||||
}
|
}
|
||||||
f.Retract = append(f.Retract, retract)
|
f.Retract = append(f.Retract, retract)
|
||||||
|
|
||||||
|
case "tool":
|
||||||
|
if len(args) != 1 {
|
||||||
|
errorf("tool directive expects exactly one argument")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
s, err := parseString(&args[0])
|
||||||
|
if err != nil {
|
||||||
|
errorf("invalid quoted string: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
f.Tool = append(f.Tool, &Tool{
|
||||||
|
Path: s,
|
||||||
|
Syntax: line,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,6 +702,22 @@ func (f *WorkFile) add(errs *ErrorList, line *Line, verb string, args []string,
|
||||||
f.Toolchain = &Toolchain{Syntax: line}
|
f.Toolchain = &Toolchain{Syntax: line}
|
||||||
f.Toolchain.Name = args[0]
|
f.Toolchain.Name = args[0]
|
||||||
|
|
||||||
|
case "godebug":
|
||||||
|
if len(args) != 1 || strings.ContainsAny(args[0], "\"`',") {
|
||||||
|
errorf("usage: godebug key=value")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
key, value, ok := strings.Cut(args[0], "=")
|
||||||
|
if !ok {
|
||||||
|
errorf("usage: godebug key=value")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
f.Godebug = append(f.Godebug, &Godebug{
|
||||||
|
Key: key,
|
||||||
|
Value: value,
|
||||||
|
Syntax: line,
|
||||||
|
})
|
||||||
|
|
||||||
case "use":
|
case "use":
|
||||||
if len(args) != 1 {
|
if len(args) != 1 {
|
||||||
errorf("usage: %s local/dir", verb)
|
errorf("usage: %s local/dir", verb)
|
||||||
|
@ -929,6 +993,15 @@ func (f *File) Format() ([]byte, error) {
|
||||||
// Cleanup cleans out all the cleared entries.
|
// Cleanup cleans out all the cleared entries.
|
||||||
func (f *File) Cleanup() {
|
func (f *File) Cleanup() {
|
||||||
w := 0
|
w := 0
|
||||||
|
for _, g := range f.Godebug {
|
||||||
|
if g.Key != "" {
|
||||||
|
f.Godebug[w] = g
|
||||||
|
w++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.Godebug = f.Godebug[:w]
|
||||||
|
|
||||||
|
w = 0
|
||||||
for _, r := range f.Require {
|
for _, r := range f.Require {
|
||||||
if r.Mod.Path != "" {
|
if r.Mod.Path != "" {
|
||||||
f.Require[w] = r
|
f.Require[w] = r
|
||||||
|
@ -1027,6 +1100,45 @@ func (f *File) AddToolchainStmt(name string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddGodebug sets the first godebug line for key to value,
|
||||||
|
// preserving any existing comments for that line and removing all
|
||||||
|
// other godebug lines for key.
|
||||||
|
//
|
||||||
|
// If no line currently exists for key, AddGodebug adds a new line
|
||||||
|
// at the end of the last godebug block.
|
||||||
|
func (f *File) AddGodebug(key, value string) error {
|
||||||
|
need := true
|
||||||
|
for _, g := range f.Godebug {
|
||||||
|
if g.Key == key {
|
||||||
|
if need {
|
||||||
|
g.Value = value
|
||||||
|
f.Syntax.updateLine(g.Syntax, "godebug", key+"="+value)
|
||||||
|
need = false
|
||||||
|
} else {
|
||||||
|
g.Syntax.markRemoved()
|
||||||
|
*g = Godebug{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if need {
|
||||||
|
f.addNewGodebug(key, value)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// addNewGodebug adds a new godebug key=value line at the end
|
||||||
|
// of the last godebug block, regardless of any existing godebug lines for key.
|
||||||
|
func (f *File) addNewGodebug(key, value string) {
|
||||||
|
line := f.Syntax.addLine(nil, "godebug", key+"="+value)
|
||||||
|
g := &Godebug{
|
||||||
|
Key: key,
|
||||||
|
Value: value,
|
||||||
|
Syntax: line,
|
||||||
|
}
|
||||||
|
f.Godebug = append(f.Godebug, g)
|
||||||
|
}
|
||||||
|
|
||||||
// AddRequire sets the first require line for path to version vers,
|
// AddRequire sets the first require line for path to version vers,
|
||||||
// preserving any existing comments for that line and removing all
|
// preserving any existing comments for that line and removing all
|
||||||
// other lines for path.
|
// other lines for path.
|
||||||
|
@ -1334,6 +1446,16 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) {
|
||||||
f.SortBlocks()
|
f.SortBlocks()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *File) DropGodebug(key string) error {
|
||||||
|
for _, g := range f.Godebug {
|
||||||
|
if g.Key == key {
|
||||||
|
g.Syntax.markRemoved()
|
||||||
|
*g = Godebug{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (f *File) DropRequire(path string) error {
|
func (f *File) DropRequire(path string) error {
|
||||||
for _, r := range f.Require {
|
for _, r := range f.Require {
|
||||||
if r.Mod.Path == path {
|
if r.Mod.Path == path {
|
||||||
|
@ -1467,6 +1589,36 @@ func (f *File) DropRetract(vi VersionInterval) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddTool adds a new tool directive with the given path.
|
||||||
|
// It does nothing if the tool line already exists.
|
||||||
|
func (f *File) AddTool(path string) error {
|
||||||
|
for _, t := range f.Tool {
|
||||||
|
if t.Path == path {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f.Tool = append(f.Tool, &Tool{
|
||||||
|
Path: path,
|
||||||
|
Syntax: f.Syntax.addLine(nil, "tool", path),
|
||||||
|
})
|
||||||
|
|
||||||
|
f.SortBlocks()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemoveTool removes a tool directive with the given path.
|
||||||
|
// It does nothing if no such tool directive exists.
|
||||||
|
func (f *File) DropTool(path string) error {
|
||||||
|
for _, t := range f.Tool {
|
||||||
|
if t.Path == path {
|
||||||
|
t.Syntax.markRemoved()
|
||||||
|
*t = Tool{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (f *File) SortBlocks() {
|
func (f *File) SortBlocks() {
|
||||||
f.removeDups() // otherwise sorting is unsafe
|
f.removeDups() // otherwise sorting is unsafe
|
||||||
|
|
||||||
|
@ -1493,9 +1645,9 @@ func (f *File) SortBlocks() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// removeDups removes duplicate exclude and replace directives.
|
// removeDups removes duplicate exclude, replace and tool directives.
|
||||||
//
|
//
|
||||||
// Earlier exclude directives take priority.
|
// Earlier exclude and tool directives take priority.
|
||||||
//
|
//
|
||||||
// Later replace directives take priority.
|
// Later replace directives take priority.
|
||||||
//
|
//
|
||||||
|
@ -1505,10 +1657,10 @@ func (f *File) SortBlocks() {
|
||||||
// retract directives are not de-duplicated since comments are
|
// retract directives are not de-duplicated since comments are
|
||||||
// meaningful, and versions may be retracted multiple times.
|
// meaningful, and versions may be retracted multiple times.
|
||||||
func (f *File) removeDups() {
|
func (f *File) removeDups() {
|
||||||
removeDups(f.Syntax, &f.Exclude, &f.Replace)
|
removeDups(f.Syntax, &f.Exclude, &f.Replace, &f.Tool)
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeDups(syntax *FileSyntax, exclude *[]*Exclude, replace *[]*Replace) {
|
func removeDups(syntax *FileSyntax, exclude *[]*Exclude, replace *[]*Replace, tool *[]*Tool) {
|
||||||
kill := make(map[*Line]bool)
|
kill := make(map[*Line]bool)
|
||||||
|
|
||||||
// Remove duplicate excludes.
|
// Remove duplicate excludes.
|
||||||
|
@ -1549,6 +1701,24 @@ func removeDups(syntax *FileSyntax, exclude *[]*Exclude, replace *[]*Replace) {
|
||||||
}
|
}
|
||||||
*replace = repl
|
*replace = repl
|
||||||
|
|
||||||
|
if tool != nil {
|
||||||
|
haveTool := make(map[string]bool)
|
||||||
|
for _, t := range *tool {
|
||||||
|
if haveTool[t.Path] {
|
||||||
|
kill[t.Syntax] = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
haveTool[t.Path] = true
|
||||||
|
}
|
||||||
|
var newTool []*Tool
|
||||||
|
for _, t := range *tool {
|
||||||
|
if !kill[t.Syntax] {
|
||||||
|
newTool = append(newTool, t)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*tool = newTool
|
||||||
|
}
|
||||||
|
|
||||||
// Duplicate require and retract directives are not removed.
|
// Duplicate require and retract directives are not removed.
|
||||||
|
|
||||||
// Drop killed statements from the syntax tree.
|
// Drop killed statements from the syntax tree.
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
type WorkFile struct {
|
type WorkFile struct {
|
||||||
Go *Go
|
Go *Go
|
||||||
Toolchain *Toolchain
|
Toolchain *Toolchain
|
||||||
|
Godebug []*Godebug
|
||||||
Use []*Use
|
Use []*Use
|
||||||
Replace []*Replace
|
Replace []*Replace
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ func ParseWork(file string, data []byte, fix VersionFixer) (*WorkFile, error) {
|
||||||
Err: fmt.Errorf("unknown block type: %s", strings.Join(x.Token, " ")),
|
Err: fmt.Errorf("unknown block type: %s", strings.Join(x.Token, " ")),
|
||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
case "use", "replace":
|
case "godebug", "use", "replace":
|
||||||
for _, l := range x.Line {
|
for _, l := range x.Line {
|
||||||
f.add(&errs, l, x.Token[0], l.Token, fix)
|
f.add(&errs, l, x.Token[0], l.Token, fix)
|
||||||
}
|
}
|
||||||
|
@ -184,6 +185,55 @@ func (f *WorkFile) DropToolchainStmt() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddGodebug sets the first godebug line for key to value,
|
||||||
|
// preserving any existing comments for that line and removing all
|
||||||
|
// other godebug lines for key.
|
||||||
|
//
|
||||||
|
// If no line currently exists for key, AddGodebug adds a new line
|
||||||
|
// at the end of the last godebug block.
|
||||||
|
func (f *WorkFile) AddGodebug(key, value string) error {
|
||||||
|
need := true
|
||||||
|
for _, g := range f.Godebug {
|
||||||
|
if g.Key == key {
|
||||||
|
if need {
|
||||||
|
g.Value = value
|
||||||
|
f.Syntax.updateLine(g.Syntax, "godebug", key+"="+value)
|
||||||
|
need = false
|
||||||
|
} else {
|
||||||
|
g.Syntax.markRemoved()
|
||||||
|
*g = Godebug{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if need {
|
||||||
|
f.addNewGodebug(key, value)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// addNewGodebug adds a new godebug key=value line at the end
|
||||||
|
// of the last godebug block, regardless of any existing godebug lines for key.
|
||||||
|
func (f *WorkFile) addNewGodebug(key, value string) {
|
||||||
|
line := f.Syntax.addLine(nil, "godebug", key+"="+value)
|
||||||
|
g := &Godebug{
|
||||||
|
Key: key,
|
||||||
|
Value: value,
|
||||||
|
Syntax: line,
|
||||||
|
}
|
||||||
|
f.Godebug = append(f.Godebug, g)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *WorkFile) DropGodebug(key string) error {
|
||||||
|
for _, g := range f.Godebug {
|
||||||
|
if g.Key == key {
|
||||||
|
g.Syntax.markRemoved()
|
||||||
|
*g = Godebug{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (f *WorkFile) AddUse(diskPath, modulePath string) error {
|
func (f *WorkFile) AddUse(diskPath, modulePath string) error {
|
||||||
need := true
|
need := true
|
||||||
for _, d := range f.Use {
|
for _, d := range f.Use {
|
||||||
|
@ -281,5 +331,5 @@ func (f *WorkFile) SortBlocks() {
|
||||||
// retract directives are not de-duplicated since comments are
|
// retract directives are not de-duplicated since comments are
|
||||||
// meaningful, and versions may be retracted multiple times.
|
// meaningful, and versions may be retracted multiple times.
|
||||||
func (f *WorkFile) removeDups() {
|
func (f *WorkFile) removeDups() {
|
||||||
removeDups(f.Syntax, nil, &f.Replace)
|
removeDups(f.Syntax, nil, &f.Replace, nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -827,10 +827,6 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
|
||||||
cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
|
cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
|
||||||
cc.peerMaxHeaderTableSize = initialHeaderTableSize
|
cc.peerMaxHeaderTableSize = initialHeaderTableSize
|
||||||
|
|
||||||
if t.AllowHTTP {
|
|
||||||
cc.nextStreamID = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
if cs, ok := c.(connectionStater); ok {
|
if cs, ok := c.(connectionStater); ok {
|
||||||
state := cs.ConnectionState()
|
state := cs.ConnectionState()
|
||||||
cc.tlsState = &state
|
cc.tlsState = &state
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,8 @@ var ARM64 struct {
|
||||||
HasSVE bool // Scalable Vector Extensions
|
HasSVE bool // Scalable Vector Extensions
|
||||||
HasSVE2 bool // Scalable Vector Extensions 2
|
HasSVE2 bool // Scalable Vector Extensions 2
|
||||||
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
|
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
|
||||||
|
HasDIT bool // Data Independent Timing support
|
||||||
|
HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions
|
||||||
_ CacheLinePad
|
_ CacheLinePad
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ func initOptions() {
|
||||||
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
||||||
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
||||||
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
||||||
|
{Name: "dit", Feature: &ARM64.HasDIT},
|
||||||
|
{Name: "i8mm", Feature: &ARM64.HasI8MM},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
||||||
ARM64.HasLRCPC = true
|
ARM64.HasLRCPC = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch extractBits(isar1, 52, 55) {
|
||||||
|
case 1:
|
||||||
|
ARM64.HasI8MM = true
|
||||||
|
}
|
||||||
|
|
||||||
// ID_AA64PFR0_EL1
|
// ID_AA64PFR0_EL1
|
||||||
switch extractBits(pfr0, 16, 19) {
|
switch extractBits(pfr0, 16, 19) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -168,6 +175,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
||||||
|
|
||||||
parseARM64SVERegister(getzfr0())
|
parseARM64SVERegister(getzfr0())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch extractBits(pfr0, 48, 51) {
|
||||||
|
case 1:
|
||||||
|
ARM64.HasDIT = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseARM64SVERegister(zfr0 uint64) {
|
func parseARM64SVERegister(zfr0 uint64) {
|
||||||
|
|
|
@ -35,8 +35,10 @@ const (
|
||||||
hwcap_SHA512 = 1 << 21
|
hwcap_SHA512 = 1 << 21
|
||||||
hwcap_SVE = 1 << 22
|
hwcap_SVE = 1 << 22
|
||||||
hwcap_ASIMDFHM = 1 << 23
|
hwcap_ASIMDFHM = 1 << 23
|
||||||
|
hwcap_DIT = 1 << 24
|
||||||
|
|
||||||
hwcap2_SVE2 = 1 << 1
|
hwcap2_SVE2 = 1 << 1
|
||||||
|
hwcap2_I8MM = 1 << 13
|
||||||
)
|
)
|
||||||
|
|
||||||
// linuxKernelCanEmulateCPUID reports whether we're running
|
// linuxKernelCanEmulateCPUID reports whether we're running
|
||||||
|
@ -106,9 +108,12 @@ func doinit() {
|
||||||
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
||||||
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
||||||
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
||||||
|
ARM64.HasDIT = isSet(hwCap, hwcap_DIT)
|
||||||
|
|
||||||
|
|
||||||
// HWCAP2 feature bits
|
// HWCAP2 feature bits
|
||||||
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
||||||
|
ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM)
|
||||||
}
|
}
|
||||||
|
|
||||||
func isSet(hwc uint, value uint) bool {
|
func isSet(hwc uint, value uint) bool {
|
||||||
|
|
|
@ -58,6 +58,7 @@ includes_Darwin='
|
||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/stdio.h>
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/clonefile.h>
|
#include <sys/clonefile.h>
|
||||||
#include <sys/kern_control.h>
|
#include <sys/kern_control.h>
|
||||||
|
|
|
@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [
|
||||||
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
||||||
return mapper.Mremap(oldData, newLength, flags)
|
return mapper.Mremap(oldData, newLength, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|
|
@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
|
||||||
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys renamexNp(from string, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
return renamexNp(from, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
return renameatxNp(fromfd, from, tofd, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
||||||
|
|
||||||
func Uname(uname *Utsname) error {
|
func Uname(uname *Utsname) error {
|
||||||
|
@ -542,6 +554,18 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys pthread_chdir_np(path string) (err error)
|
||||||
|
|
||||||
|
func PthreadChdir(path string) (err error) {
|
||||||
|
return pthread_chdir_np(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys pthread_fchdir_np(fd int) (err error)
|
||||||
|
|
||||||
|
func PthreadFchdir(fd int) (err error) {
|
||||||
|
return pthread_fchdir_np(fd)
|
||||||
|
}
|
||||||
|
|
||||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
|
|
|
@ -2592,3 +2592,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
||||||
|
//sys Mseal(b []byte, flags uint) (err error)
|
||||||
|
|
|
@ -293,6 +293,7 @@ func Uname(uname *Utsname) error {
|
||||||
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
||||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||||
|
//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
|
||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
|
|
|
@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) {
|
||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
|
||||||
|
return mapper.munmap(uintptr(addr), length)
|
||||||
|
}
|
||||||
|
|
||||||
func Read(fd int, p []byte) (n int, err error) {
|
func Read(fd int, p []byte) (n int, err error) {
|
||||||
n, err = read(fd, p)
|
n, err = read(fd, p)
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
|
|
|
@ -1169,6 +1169,11 @@ const (
|
||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
|
|
|
@ -1169,6 +1169,11 @@ const (
|
||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
|
|
|
@ -457,6 +457,7 @@ const (
|
||||||
B600 = 0x8
|
B600 = 0x8
|
||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BCACHEFS_SUPER_MAGIC = 0xca451a4e
|
||||||
BDEVFS_MAGIC = 0x62646576
|
BDEVFS_MAGIC = 0x62646576
|
||||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||||
BINFMTFS_MAGIC = 0x42494e4d
|
BINFMTFS_MAGIC = 0x42494e4d
|
||||||
|
@ -928,6 +929,7 @@ const (
|
||||||
EPOLL_CTL_ADD = 0x1
|
EPOLL_CTL_ADD = 0x1
|
||||||
EPOLL_CTL_DEL = 0x2
|
EPOLL_CTL_DEL = 0x2
|
||||||
EPOLL_CTL_MOD = 0x3
|
EPOLL_CTL_MOD = 0x3
|
||||||
|
EPOLL_IOC_TYPE = 0x8a
|
||||||
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
||||||
ESP_V4_FLOW = 0xa
|
ESP_V4_FLOW = 0xa
|
||||||
ESP_V6_FLOW = 0xc
|
ESP_V6_FLOW = 0xc
|
||||||
|
@ -941,9 +943,6 @@ const (
|
||||||
ETHTOOL_FEC_OFF = 0x4
|
ETHTOOL_FEC_OFF = 0x4
|
||||||
ETHTOOL_FEC_RS = 0x8
|
ETHTOOL_FEC_RS = 0x8
|
||||||
ETHTOOL_FLAG_ALL = 0x7
|
ETHTOOL_FLAG_ALL = 0x7
|
||||||
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
|
|
||||||
ETHTOOL_FLAG_OMIT_REPLY = 0x2
|
|
||||||
ETHTOOL_FLAG_STATS = 0x4
|
|
||||||
ETHTOOL_FLASHDEV = 0x33
|
ETHTOOL_FLASHDEV = 0x33
|
||||||
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
||||||
ETHTOOL_FWVERS_LEN = 0x20
|
ETHTOOL_FWVERS_LEN = 0x20
|
||||||
|
@ -1705,6 +1704,7 @@ const (
|
||||||
KEXEC_ARCH_S390 = 0x160000
|
KEXEC_ARCH_S390 = 0x160000
|
||||||
KEXEC_ARCH_SH = 0x2a0000
|
KEXEC_ARCH_SH = 0x2a0000
|
||||||
KEXEC_ARCH_X86_64 = 0x3e0000
|
KEXEC_ARCH_X86_64 = 0x3e0000
|
||||||
|
KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8
|
||||||
KEXEC_FILE_DEBUG = 0x8
|
KEXEC_FILE_DEBUG = 0x8
|
||||||
KEXEC_FILE_NO_INITRAMFS = 0x4
|
KEXEC_FILE_NO_INITRAMFS = 0x4
|
||||||
KEXEC_FILE_ON_CRASH = 0x2
|
KEXEC_FILE_ON_CRASH = 0x2
|
||||||
|
@ -1780,6 +1780,7 @@ const (
|
||||||
KEY_SPEC_USER_KEYRING = -0x4
|
KEY_SPEC_USER_KEYRING = -0x4
|
||||||
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
||||||
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
||||||
|
LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000
|
||||||
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
||||||
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
||||||
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
||||||
|
@ -1861,6 +1862,19 @@ const (
|
||||||
MAP_FILE = 0x0
|
MAP_FILE = 0x0
|
||||||
MAP_FIXED = 0x10
|
MAP_FIXED = 0x10
|
||||||
MAP_FIXED_NOREPLACE = 0x100000
|
MAP_FIXED_NOREPLACE = 0x100000
|
||||||
|
MAP_HUGE_16GB = 0x88000000
|
||||||
|
MAP_HUGE_16KB = 0x38000000
|
||||||
|
MAP_HUGE_16MB = 0x60000000
|
||||||
|
MAP_HUGE_1GB = 0x78000000
|
||||||
|
MAP_HUGE_1MB = 0x50000000
|
||||||
|
MAP_HUGE_256MB = 0x70000000
|
||||||
|
MAP_HUGE_2GB = 0x7c000000
|
||||||
|
MAP_HUGE_2MB = 0x54000000
|
||||||
|
MAP_HUGE_32MB = 0x64000000
|
||||||
|
MAP_HUGE_512KB = 0x4c000000
|
||||||
|
MAP_HUGE_512MB = 0x74000000
|
||||||
|
MAP_HUGE_64KB = 0x40000000
|
||||||
|
MAP_HUGE_8MB = 0x5c000000
|
||||||
MAP_HUGE_MASK = 0x3f
|
MAP_HUGE_MASK = 0x3f
|
||||||
MAP_HUGE_SHIFT = 0x1a
|
MAP_HUGE_SHIFT = 0x1a
|
||||||
MAP_PRIVATE = 0x2
|
MAP_PRIVATE = 0x2
|
||||||
|
@ -2498,6 +2512,23 @@ const (
|
||||||
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
||||||
PR_PAC_RESET_KEYS = 0x36
|
PR_PAC_RESET_KEYS = 0x36
|
||||||
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR = 0x4
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10
|
||||||
|
PR_PPC_DEXCR_CTRL_EDITABLE = 0x1
|
||||||
|
PR_PPC_DEXCR_CTRL_MASK = 0x1f
|
||||||
|
PR_PPC_DEXCR_CTRL_SET = 0x2
|
||||||
|
PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8
|
||||||
|
PR_PPC_DEXCR_IBRTPD = 0x1
|
||||||
|
PR_PPC_DEXCR_NPHIE = 0x3
|
||||||
|
PR_PPC_DEXCR_SBHE = 0x0
|
||||||
|
PR_PPC_DEXCR_SRAPD = 0x2
|
||||||
|
PR_PPC_GET_DEXCR = 0x48
|
||||||
|
PR_PPC_SET_DEXCR = 0x49
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_OFF = 0x1
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_ON = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_PROCESS = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_THREAD = 0x1
|
||||||
|
PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47
|
||||||
PR_RISCV_V_GET_CONTROL = 0x46
|
PR_RISCV_V_GET_CONTROL = 0x46
|
||||||
PR_RISCV_V_SET_CONTROL = 0x45
|
PR_RISCV_V_SET_CONTROL = 0x45
|
||||||
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
||||||
|
@ -3192,6 +3223,7 @@ const (
|
||||||
STATX_MTIME = 0x40
|
STATX_MTIME = 0x40
|
||||||
STATX_NLINK = 0x4
|
STATX_NLINK = 0x4
|
||||||
STATX_SIZE = 0x200
|
STATX_SIZE = 0x200
|
||||||
|
STATX_SUBVOL = 0x8000
|
||||||
STATX_TYPE = 0x1
|
STATX_TYPE = 0x1
|
||||||
STATX_UID = 0x8
|
STATX_UID = 0x8
|
||||||
STATX__RESERVED = 0x80000000
|
STATX__RESERVED = 0x80000000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
ESR_MAGIC = 0x45535201
|
ESR_MAGIC = 0x45535201
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -78,6 +78,8 @@ const (
|
||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -82,6 +82,8 @@ const (
|
||||||
EFD_CLOEXEC = 0x400000
|
EFD_CLOEXEC = 0x400000
|
||||||
EFD_NONBLOCK = 0x4000
|
EFD_NONBLOCK = 0x4000
|
||||||
EMT_TAGOVF = 0x1
|
EMT_TAGOVF = 0x1
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x400000
|
EPOLL_CLOEXEC = 0x400000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
|
|
|
@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renamex_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renameatx_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(mib) > 0 {
|
if len(mib) > 0 {
|
||||||
|
@ -760,6 +808,39 @@ var libc_sysctl_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_chdir_np(path string) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_chdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_fchdir_np(fd int) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_fchdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -223,11 +223,31 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renamex_np(SB)
|
||||||
|
GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameatx_np(SB)
|
||||||
|
GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sysctl(SB)
|
JMP libc_sysctl(SB)
|
||||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_chdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_fchdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sendfile(SB)
|
JMP libc_sendfile(SB)
|
||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renamex_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(from)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(to)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_renameatx_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||||
var _p0 unsafe.Pointer
|
var _p0 unsafe.Pointer
|
||||||
if len(mib) > 0 {
|
if len(mib) > 0 {
|
||||||
|
@ -760,6 +808,39 @@ var libc_sysctl_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_chdir_np(path string) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(path)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_chdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func pthread_fchdir_np(fd int) (err error) {
|
||||||
|
_, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_pthread_fchdir_np_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||||
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -223,11 +223,31 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renamex_np(SB)
|
||||||
|
GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameatx_np(SB)
|
||||||
|
GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sysctl(SB)
|
JMP libc_sysctl(SB)
|
||||||
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_chdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pthread_fchdir_np(SB)
|
||||||
|
GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_sendfile(SB)
|
JMP libc_sendfile(SB)
|
||||||
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -2229,3 +2229,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mseal(b []byte, flags uint) (err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(b) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&b[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
_, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
CALL libc_mount(SB)
|
||||||
|
RET
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
CALL libc_nanosleep(SB)
|
CALL libc_nanosleep(SB)
|
||||||
RET
|
RET
|
||||||
|
|
|
@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
|
||||||
|
var _p0 *byte
|
||||||
|
_p0, err = BytePtrFromString(fsType)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var _p1 *byte
|
||||||
|
_p1, err = BytePtrFromString(dir)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_mount_trampoline_addr uintptr
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_mount mount "libc.so"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||||
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
_, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
|
||||||
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mount(SB)
|
||||||
|
GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
|
||||||
|
|
||||||
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
JMP libc_nanosleep(SB)
|
JMP libc_nanosleep(SB)
|
||||||
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
|
||||||
|
|
|
@ -457,4 +457,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -379,4 +379,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -421,4 +421,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -324,4 +324,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -318,4 +318,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -441,4 +441,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 4459
|
SYS_LSM_GET_SELF_ATTR = 4459
|
||||||
SYS_LSM_SET_SELF_ATTR = 4460
|
SYS_LSM_SET_SELF_ATTR = 4460
|
||||||
SYS_LSM_LIST_MODULES = 4461
|
SYS_LSM_LIST_MODULES = 4461
|
||||||
|
SYS_MSEAL = 4462
|
||||||
)
|
)
|
||||||
|
|
|
@ -371,4 +371,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 5459
|
SYS_LSM_GET_SELF_ATTR = 5459
|
||||||
SYS_LSM_SET_SELF_ATTR = 5460
|
SYS_LSM_SET_SELF_ATTR = 5460
|
||||||
SYS_LSM_LIST_MODULES = 5461
|
SYS_LSM_LIST_MODULES = 5461
|
||||||
|
SYS_MSEAL = 5462
|
||||||
)
|
)
|
||||||
|
|
|
@ -371,4 +371,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 5459
|
SYS_LSM_GET_SELF_ATTR = 5459
|
||||||
SYS_LSM_SET_SELF_ATTR = 5460
|
SYS_LSM_SET_SELF_ATTR = 5460
|
||||||
SYS_LSM_LIST_MODULES = 5461
|
SYS_LSM_LIST_MODULES = 5461
|
||||||
|
SYS_MSEAL = 5462
|
||||||
)
|
)
|
||||||
|
|
|
@ -441,4 +441,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 4459
|
SYS_LSM_GET_SELF_ATTR = 4459
|
||||||
SYS_LSM_SET_SELF_ATTR = 4460
|
SYS_LSM_SET_SELF_ATTR = 4460
|
||||||
SYS_LSM_LIST_MODULES = 4461
|
SYS_LSM_LIST_MODULES = 4461
|
||||||
|
SYS_MSEAL = 4462
|
||||||
)
|
)
|
||||||
|
|
|
@ -448,4 +448,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -420,4 +420,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -420,4 +420,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -325,4 +325,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -386,4 +386,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
|
@ -399,4 +399,5 @@ const (
|
||||||
SYS_LSM_GET_SELF_ATTR = 459
|
SYS_LSM_GET_SELF_ATTR = 459
|
||||||
SYS_LSM_SET_SELF_ATTR = 460
|
SYS_LSM_SET_SELF_ATTR = 460
|
||||||
SYS_LSM_LIST_MODULES = 461
|
SYS_LSM_LIST_MODULES = 461
|
||||||
|
SYS_MSEAL = 462
|
||||||
)
|
)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue