mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-24 07:43:24 +00:00
Compare commits
1 Commits
0.16.10
...
quick_shut
Author | SHA1 | Date | |
---|---|---|---|
5b36a3a923 |
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.20.x
|
go-version: 1.19.x
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: make test
|
run: make test
|
||||||
|
2
.github/workflows/publish.yaml
vendored
2
.github/workflows/publish.yaml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.20.x
|
go-version: 1.19.x
|
||||||
- name: Make publish
|
- name: Make publish
|
||||||
run: make publish
|
run: make publish
|
||||||
- name: Upload release binaries
|
- name: Upload release binaries
|
||||||
|
@ -92,6 +92,7 @@ func runUp(cmd *cobra.Command, _ []string) error {
|
|||||||
<-sig
|
<-sig
|
||||||
|
|
||||||
log.Printf("Signal received.. shutting down server in %s\n", shutdownTimeout.String())
|
log.Printf("Signal received.. shutting down server in %s\n", shutdownTimeout.String())
|
||||||
|
|
||||||
err := supervisor.Remove(services)
|
err := supervisor.Remove(services)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
@ -2,7 +2,7 @@ version: "3.7"
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
nats:
|
nats:
|
||||||
image: docker.io/library/nats-streaming:0.25.5
|
image: docker.io/library/nats-streaming:0.25.3
|
||||||
# nobody
|
# nobody
|
||||||
user: "65534"
|
user: "65534"
|
||||||
command:
|
command:
|
||||||
@ -21,7 +21,7 @@ services:
|
|||||||
# - "127.0.0.1:8222:8222"
|
# - "127.0.0.1:8222:8222"
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: docker.io/prom/prometheus:v2.45.0
|
image: docker.io/prom/prometheus:v2.42.0
|
||||||
# nobody
|
# nobody
|
||||||
user: "65534"
|
user: "65534"
|
||||||
volumes:
|
volumes:
|
||||||
@ -39,7 +39,7 @@ services:
|
|||||||
- "127.0.0.1:9090:9090"
|
- "127.0.0.1:9090:9090"
|
||||||
|
|
||||||
gateway:
|
gateway:
|
||||||
image: ghcr.io/openfaas/gateway:0.26.4
|
image: ghcr.io/openfaas/gateway:0.26.3
|
||||||
environment:
|
environment:
|
||||||
- basic_auth=true
|
- basic_auth=true
|
||||||
- functions_provider_url=http://faasd-provider:8081/
|
- functions_provider_url=http://faasd-provider:8081/
|
||||||
|
56
go.mod
56
go.mod
@ -1,47 +1,43 @@
|
|||||||
module github.com/openfaas/faasd
|
module github.com/openfaas/faasd
|
||||||
|
|
||||||
go 1.20
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alexellis/arkade v0.0.0-20230705083451-a4dd6013ddcd
|
github.com/alexellis/arkade v0.0.0-20230317160202-4d8f80c5b033
|
||||||
github.com/alexellis/go-execute v0.6.0
|
github.com/alexellis/go-execute v0.5.0
|
||||||
github.com/compose-spec/compose-go v0.0.0-20200528042322-36d8ce368e05
|
github.com/compose-spec/compose-go v0.0.0-20200528042322-36d8ce368e05
|
||||||
github.com/containerd/containerd v1.7.0
|
github.com/containerd/containerd v1.7.0
|
||||||
github.com/containerd/go-cni v1.1.9
|
github.com/containerd/go-cni v1.1.9
|
||||||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
|
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
|
||||||
github.com/docker/cli v24.0.2+incompatible
|
github.com/docker/cli v23.0.1+incompatible
|
||||||
github.com/docker/distribution v2.8.2+incompatible
|
github.com/docker/distribution v2.8.2+incompatible
|
||||||
github.com/docker/docker v24.0.2+incompatible // indirect
|
github.com/docker/docker v23.0.3+incompatible // indirect
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/morikuni/aec v1.0.0
|
github.com/morikuni/aec v1.0.0
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.3
|
github.com/opencontainers/runtime-spec v1.1.0-rc.1
|
||||||
github.com/openfaas/faas-provider v0.23.0
|
github.com/openfaas/faas-provider v0.21.0
|
||||||
github.com/openfaas/faas/gateway v0.0.0-20230628073303-c0d710c97ff7
|
github.com/openfaas/faas/gateway v0.0.0-20230317100158-e44448c5dca2
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/sethvargo/go-password v0.2.0
|
github.com/sethvargo/go-password v0.2.0
|
||||||
github.com/spf13/cobra v1.7.0
|
github.com/spf13/cobra v1.6.1
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2
|
github.com/vishvananda/netlink v1.2.1-beta.2
|
||||||
github.com/vishvananda/netns v0.0.4
|
github.com/vishvananda/netns v0.0.4
|
||||||
golang.org/x/sys v0.10.0
|
golang.org/x/sys v0.6.0
|
||||||
k8s.io/apimachinery v0.27.3
|
k8s.io/apimachinery v0.26.3
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
|
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
|
||||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
|
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
|
||||||
github.com/Masterminds/semver v1.5.0 // indirect
|
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
|
||||||
github.com/Microsoft/hcsshim v0.10.0-rc.7 // indirect
|
github.com/Microsoft/hcsshim v0.10.0-rc.7 // indirect
|
||||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/cheggaaa/pb/v3 v3.1.2 // indirect
|
|
||||||
github.com/containerd/cgroups v1.1.0 // indirect
|
github.com/containerd/cgroups v1.1.0 // indirect
|
||||||
github.com/containerd/continuity v0.3.0 // indirect
|
github.com/containerd/continuity v0.3.0 // indirect
|
||||||
github.com/containerd/fifo v1.1.0 // indirect
|
github.com/containerd/fifo v1.1.0 // indirect
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
|
|
||||||
github.com/containerd/ttrpc v1.2.1 // indirect
|
github.com/containerd/ttrpc v1.2.1 // indirect
|
||||||
github.com/containerd/typeurl/v2 v2.1.0 // indirect
|
github.com/containerd/typeurl/v2 v2.1.0 // indirect
|
||||||
github.com/containernetworking/cni v1.1.2 // indirect
|
github.com/containernetworking/cni v1.1.2 // indirect
|
||||||
@ -49,60 +45,44 @@ require (
|
|||||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||||
github.com/docker/go-connections v0.4.0 // indirect
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
|
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
|
||||||
github.com/fatih/color v1.14.1 // indirect
|
|
||||||
github.com/go-logr/logr v1.2.3 // indirect
|
github.com/go-logr/logr v1.2.3 // indirect
|
||||||
github.com/go-logr/stdr v1.2.2 // indirect
|
github.com/go-logr/stdr v1.2.2 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // 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.3 // indirect
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
github.com/google/go-cmp v0.5.9 // indirect
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
github.com/google/go-containerregistry v0.15.2 // indirect
|
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
github.com/imdario/mergo v0.3.14 // indirect
|
github.com/imdario/mergo v0.3.14 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
github.com/klauspost/compress v1.16.5 // indirect
|
github.com/klauspost/compress v1.16.3 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
|
||||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
|
||||||
github.com/mattn/go-runewidth v0.0.13 // indirect
|
|
||||||
github.com/mattn/go-shellwords v1.0.12 // indirect
|
github.com/mattn/go-shellwords v1.0.12 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/moby/locker v1.0.1 // indirect
|
github.com/moby/locker v1.0.1 // indirect
|
||||||
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||||
github.com/moby/sys/sequential v0.5.0 // indirect
|
github.com/moby/sys/sequential v0.5.0 // indirect
|
||||||
github.com/moby/sys/signal v0.7.0 // indirect
|
github.com/moby/sys/signal v0.7.0 // indirect
|
||||||
github.com/nats-io/nats.go v1.22.1 // indirect
|
|
||||||
github.com/nats-io/nkeys v0.3.0 // indirect
|
|
||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
|
||||||
github.com/nats-io/stan.go v0.10.4 // indirect
|
|
||||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
|
||||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
|
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
|
||||||
github.com/opencontainers/runc v1.1.5 // indirect
|
github.com/opencontainers/runc v1.1.5 // indirect
|
||||||
github.com/opencontainers/selinux v1.11.0 // indirect
|
github.com/opencontainers/selinux v1.11.0 // indirect
|
||||||
github.com/openfaas/nats-queue-worker v0.0.0-20230117214128-3615ccb286cc // indirect
|
|
||||||
github.com/otiai10/copy v1.12.0 // indirect
|
|
||||||
github.com/prometheus/client_golang v1.14.0 // indirect
|
github.com/prometheus/client_golang v1.14.0 // indirect
|
||||||
github.com/prometheus/client_model v0.3.0 // indirect
|
github.com/prometheus/client_model v0.3.0 // indirect
|
||||||
github.com/prometheus/common v0.42.0 // indirect
|
github.com/prometheus/common v0.42.0 // indirect
|
||||||
github.com/prometheus/procfs v0.9.0 // indirect
|
github.com/prometheus/procfs v0.9.0 // indirect
|
||||||
github.com/rivo/uniseg v0.2.0 // indirect
|
|
||||||
github.com/rogpeppe/go-internal v1.6.1 // indirect
|
github.com/rogpeppe/go-internal v1.6.1 // indirect
|
||||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||||
github.com/vbatts/tar-split v0.11.3 // indirect
|
|
||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
go.opencensus.io v0.24.0 // indirect
|
||||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||||
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||||
golang.org/x/crypto v0.10.0 // indirect
|
golang.org/x/mod v0.9.0 // indirect
|
||||||
golang.org/x/mod v0.12.0 // indirect
|
golang.org/x/net v0.8.0 // indirect
|
||||||
golang.org/x/net v0.10.0 // indirect
|
|
||||||
golang.org/x/sync v0.1.0 // indirect
|
golang.org/x/sync v0.1.0 // indirect
|
||||||
golang.org/x/text v0.10.0 // indirect
|
golang.org/x/text v0.8.0 // indirect
|
||||||
golang.org/x/tools v0.8.0 // indirect
|
golang.org/x/tools v0.7.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||||
google.golang.org/grpc v1.53.0 // indirect
|
google.golang.org/grpc v1.53.0 // indirect
|
||||||
google.golang.org/protobuf v1.30.0 // indirect
|
google.golang.org/protobuf v1.30.0 // indirect
|
||||||
|
103
go.sum
103
go.sum
@ -4,33 +4,20 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h
|
|||||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA=
|
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA=
|
||||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU=
|
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
|
||||||
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
|
||||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
|
||||||
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
|
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
|
||||||
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
|
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
|
||||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
|
||||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
|
||||||
github.com/Microsoft/hcsshim v0.10.0-rc.7 h1:HBytQPxcv8Oy4244zbQbe6hnOnx544eL5QPUqhJldz8=
|
github.com/Microsoft/hcsshim v0.10.0-rc.7 h1:HBytQPxcv8Oy4244zbQbe6hnOnx544eL5QPUqhJldz8=
|
||||||
github.com/Microsoft/hcsshim v0.10.0-rc.7/go.mod h1:ILuwjA+kNW+MrN/w5un7n3mTqkwsFu4Bp05/okFUZlE=
|
github.com/Microsoft/hcsshim v0.10.0-rc.7/go.mod h1:ILuwjA+kNW+MrN/w5un7n3mTqkwsFu4Bp05/okFUZlE=
|
||||||
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
|
|
||||||
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
|
|
||||||
github.com/alexellis/arkade v0.0.0-20230317160202-4d8f80c5b033 h1:nq1a5V5MOoiLIKLOpB6HGeoRjdzKFoFQ6S1jMwIPdDY=
|
github.com/alexellis/arkade v0.0.0-20230317160202-4d8f80c5b033 h1:nq1a5V5MOoiLIKLOpB6HGeoRjdzKFoFQ6S1jMwIPdDY=
|
||||||
github.com/alexellis/arkade v0.0.0-20230317160202-4d8f80c5b033/go.mod h1:T8i2qJQ5D13uTn+IgGCpC+ylJ3fb+bcnfrLppWcCuSo=
|
github.com/alexellis/arkade v0.0.0-20230317160202-4d8f80c5b033/go.mod h1:T8i2qJQ5D13uTn+IgGCpC+ylJ3fb+bcnfrLppWcCuSo=
|
||||||
github.com/alexellis/arkade v0.0.0-20230705083451-a4dd6013ddcd h1:Cvt1/JwejfGBTfZUuqa4EdiyV8VPIDTCJ3fua+QqUpc=
|
|
||||||
github.com/alexellis/arkade v0.0.0-20230705083451-a4dd6013ddcd/go.mod h1:PupjhF444AKYAD3NRbzCMhLWHiF/uixUmCWDuR2PzWA=
|
|
||||||
github.com/alexellis/go-execute v0.5.0 h1:L8kgNlFzNbJov7jrInlaig7i6ZUSz/tYYmqvb8dyD0s=
|
github.com/alexellis/go-execute v0.5.0 h1:L8kgNlFzNbJov7jrInlaig7i6ZUSz/tYYmqvb8dyD0s=
|
||||||
github.com/alexellis/go-execute v0.5.0/go.mod h1:AgHTcsCF9wrP0mMVTO8N+lFw1Biy71NybBOk8M+qgy8=
|
github.com/alexellis/go-execute v0.5.0/go.mod h1:AgHTcsCF9wrP0mMVTO8N+lFw1Biy71NybBOk8M+qgy8=
|
||||||
github.com/alexellis/go-execute v0.6.0 h1:FVGoudJnWSObwf9qmehbvVuvhK6g1UpKOCBjS+OUXEA=
|
|
||||||
github.com/alexellis/go-execute v0.6.0/go.mod h1:nlg2F6XdYydUm1xXQMMiuibQCV1mveybBkNWfdNznjk=
|
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
|
github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
|
||||||
github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ=
|
|
||||||
github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4=
|
|
||||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||||
@ -50,8 +37,6 @@ github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY
|
|||||||
github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o=
|
github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o=
|
||||||
github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU=
|
github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU=
|
||||||
github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM=
|
github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM=
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k=
|
|
||||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o=
|
|
||||||
github.com/containerd/ttrpc v1.2.1 h1:VWv/Rzx023TBLv4WQ+9WPXlBG/s3rsRjY3i9AJ2BJdE=
|
github.com/containerd/ttrpc v1.2.1 h1:VWv/Rzx023TBLv4WQ+9WPXlBG/s3rsRjY3i9AJ2BJdE=
|
||||||
github.com/containerd/ttrpc v1.2.1/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
|
github.com/containerd/ttrpc v1.2.1/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak=
|
||||||
github.com/containerd/typeurl/v2 v2.1.0 h1:yNAhJvbNEANt7ck48IlEGOxP7YAp6LLpGn5jZACDNIE=
|
github.com/containerd/typeurl/v2 v2.1.0 h1:yNAhJvbNEANt7ck48IlEGOxP7YAp6LLpGn5jZACDNIE=
|
||||||
@ -70,18 +55,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
|||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM=
|
github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM=
|
||||||
github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||||
github.com/docker/cli v23.0.5+incompatible h1:ufWmAOuD3Vmr7JP2G5K3cyuNC4YZWiAsuDEvFVVDafE=
|
|
||||||
github.com/docker/cli v23.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
|
||||||
github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM=
|
|
||||||
github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
|
||||||
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
|
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
|
||||||
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho=
|
github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho=
|
||||||
github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k=
|
|
||||||
github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
|
||||||
github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg=
|
|
||||||
github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
|
||||||
github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
|
github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
|
||||||
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
|
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
|
||||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||||
@ -95,8 +72,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
|||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
|
||||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
|
||||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||||
@ -142,8 +117,6 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE=
|
|
||||||
github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q=
|
|
||||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
@ -163,8 +136,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
|
|||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY=
|
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY=
|
||||||
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||||
github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
|
|
||||||
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
@ -172,21 +143,11 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
|||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
|
||||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
|
||||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
|
||||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
|
||||||
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
|
|
||||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
|
||||||
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||||
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
|
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
|
||||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
|
||||||
github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||||
@ -202,18 +163,8 @@ github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn
|
|||||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||||
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
|
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
|
||||||
github.com/nats-io/nats.go v1.22.1 h1:XzfqDspY0RNufzdrB8c4hFR+R3dahkxlpWe5+IWJzbE=
|
|
||||||
github.com/nats-io/nats.go v1.22.1/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA=
|
|
||||||
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
|
|
||||||
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
|
|
||||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
|
||||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
|
||||||
github.com/nats-io/stan.go v0.10.4 h1:19GS/eD1SeQJaVkeM9EkvEYattnvnWrZ3wkSWSw4uXw=
|
|
||||||
github.com/nats-io/stan.go v0.10.4/go.mod h1:3XJXH8GagrGqajoO/9+HgPyKV5MWsv7S5ccdda+pc6k=
|
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
|
||||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.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.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
|
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
|
||||||
@ -228,30 +179,18 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
|
|||||||
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/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
|
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
|
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
|
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
|
|
||||||
github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs=
|
github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs=
|
||||||
github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
|
github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
|
||||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w=
|
github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w=
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.3 h1:l04uafi6kxByhbxev7OWiuUv0LZxEsYUfDWZ6bztAuU=
|
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.3/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
|
||||||
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
|
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
|
||||||
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
|
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
|
||||||
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
|
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
|
||||||
github.com/openfaas/faas-provider v0.21.0 h1:rnTy1Gpx+0YvqriQD8miQ2DfpOJXYZbV3VMqe8ri5lc=
|
github.com/openfaas/faas-provider v0.21.0 h1:rnTy1Gpx+0YvqriQD8miQ2DfpOJXYZbV3VMqe8ri5lc=
|
||||||
github.com/openfaas/faas-provider v0.21.0/go.mod h1:Farrp+9Med8LeK3aoYpqplMP8f5ebTILbCSLg2LPLZk=
|
github.com/openfaas/faas-provider v0.21.0/go.mod h1:Farrp+9Med8LeK3aoYpqplMP8f5ebTILbCSLg2LPLZk=
|
||||||
github.com/openfaas/faas-provider v0.23.0 h1:C29yoEa+00YriqcGVii/R6P22IDlzoMuR3V49Po4vBI=
|
|
||||||
github.com/openfaas/faas-provider v0.23.0/go.mod h1:yZyfou3iBkvvH6jILaeUivgy3RhnWABh+Ze4rGUG2wM=
|
|
||||||
github.com/openfaas/faas/gateway v0.0.0-20230317100158-e44448c5dca2 h1:mSQlNX+etC2pd+yxZrkOj91vO0Vma75XHjI8+mKdS+A=
|
github.com/openfaas/faas/gateway v0.0.0-20230317100158-e44448c5dca2 h1:mSQlNX+etC2pd+yxZrkOj91vO0Vma75XHjI8+mKdS+A=
|
||||||
github.com/openfaas/faas/gateway v0.0.0-20230317100158-e44448c5dca2/go.mod h1:iQNG+Up27CXDLHgIr9mcifTzaPD2mYOFTZW8MHxib7M=
|
github.com/openfaas/faas/gateway v0.0.0-20230317100158-e44448c5dca2/go.mod h1:iQNG+Up27CXDLHgIr9mcifTzaPD2mYOFTZW8MHxib7M=
|
||||||
github.com/openfaas/faas/gateway v0.0.0-20230628073303-c0d710c97ff7 h1:L93R55OfxBjoWVR5bCWn1HHbVzyiNTL+hgWloS/hNrg=
|
|
||||||
github.com/openfaas/faas/gateway v0.0.0-20230628073303-c0d710c97ff7/go.mod h1:REnxOe821v2IRlQEvj1Gjt5w1Xdshx8IT5/UF1MlEQc=
|
|
||||||
github.com/openfaas/nats-queue-worker v0.0.0-20230117214128-3615ccb286cc h1:qMcVTwdbRAqZtQrYS9rvUxnbQY6nmqf7CIsjp7A+cOo=
|
|
||||||
github.com/openfaas/nats-queue-worker v0.0.0-20230117214128-3615ccb286cc/go.mod h1:s86POyW6C8S4CALFRhO8ax5sR2uaQUJQ0HaQGvbTpTc=
|
|
||||||
github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY=
|
|
||||||
github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
@ -267,8 +206,6 @@ github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr
|
|||||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||||
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
|
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
|
||||||
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
|
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
|
||||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
|
||||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
@ -283,8 +220,6 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0
|
|||||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
||||||
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
|
||||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
|
||||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
@ -302,9 +237,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
|
|||||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||||
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
|
|
||||||
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
|
|
||||||
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
|
|
||||||
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
|
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
|
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
|
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
|
||||||
@ -321,7 +253,6 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17
|
|||||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
|
||||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||||
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
|
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
|
||||||
@ -332,22 +263,14 @@ go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA=
|
|||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
|
||||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
|
||||||
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
|
|
||||||
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
|
|
||||||
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/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=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
|
||||||
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||||
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
|
||||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
|
||||||
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=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@ -360,14 +283,9 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/
|
|||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
|
||||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
|
||||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
|
||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
|
||||||
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/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@ -376,7 +294,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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-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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
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=
|
||||||
@ -399,35 +316,20 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||||
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.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
|
|
||||||
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
|
||||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
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.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
|
||||||
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=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/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.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|
||||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
|
|
||||||
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
@ -438,11 +340,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
|
|||||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
|
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
|
||||||
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
||||||
golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y=
|
|
||||||
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
|
|
||||||
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=
|
||||||
@ -500,5 +399,3 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
|
|||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k=
|
k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k=
|
||||||
k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I=
|
k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I=
|
||||||
k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM=
|
|
||||||
k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E=
|
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/containerd/containerd"
|
"github.com/containerd/containerd"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
@ -32,8 +33,7 @@ func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.Res
|
|||||||
log.Printf("[Delete] request: %s\n", string(body))
|
log.Printf("[Delete] request: %s\n", string(body))
|
||||||
|
|
||||||
req := requests.DeleteFunctionRequest{}
|
req := requests.DeleteFunctionRequest{}
|
||||||
err := json.Unmarshal(body, &req)
|
if err := json.Unmarshal(body, &req); err != nil {
|
||||||
if err != nil {
|
|
||||||
log.Printf("[Delete] error parsing input: %s\n", err)
|
log.Printf("[Delete] error parsing input: %s\n", err)
|
||||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.Res
|
|||||||
|
|
||||||
function, err := GetFunction(client, name, lookupNamespace)
|
function, err := GetFunction(client, name, lookupNamespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := fmt.Sprintf("service %s not found", name)
|
msg := fmt.Sprintf("function: %s not found", name)
|
||||||
log.Printf("[Delete] %s\n", msg)
|
log.Printf("[Delete] %s\n", msg)
|
||||||
http.Error(w, msg, http.StatusNotFound)
|
http.Error(w, msg, http.StatusNotFound)
|
||||||
return
|
return
|
||||||
@ -70,17 +70,29 @@ func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.Res
|
|||||||
if function.replicas != 0 {
|
if function.replicas != 0 {
|
||||||
err = cninetwork.DeleteCNINetwork(ctx, cni, client, name)
|
err = cninetwork.DeleteCNINetwork(ctx, cni, client, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[Delete] error removing CNI network for %s, %s\n", name, err)
|
log.Printf("[Delete] error removing CNI network for: %s, %s\n", name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
containerErr := service.Remove(ctx, client, name)
|
killTimeout := getKillTimeout(function.envVars)
|
||||||
if containerErr != nil {
|
|
||||||
log.Printf("[Delete] error removing %s, %s\n", name, containerErr)
|
if err := service.Remove(ctx, client, name, killTimeout); err != nil {
|
||||||
http.Error(w, containerErr.Error(), http.StatusInternalServerError)
|
log.Printf("[Delete] error removing %s, %s\n", name, err)
|
||||||
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[Delete] deleted %s\n", name)
|
log.Printf("[Delete] deleted: %s\n", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getKillTimeout(envs map[string]string) time.Duration {
|
||||||
|
killTimeout := time.Second * 5
|
||||||
|
if v, ok := envs["healthcheck_interval"]; ok {
|
||||||
|
dur, err := time.ParseDuration(v)
|
||||||
|
if err == nil {
|
||||||
|
killTimeout = dur
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return killTimeout
|
||||||
|
}
|
||||||
|
@ -39,6 +39,7 @@ func MakeUpdateHandler(client *containerd.Client, cni gocni.CNI, secretMountPath
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
name := req.Service
|
name := req.Service
|
||||||
namespace := getRequestNamespace(req.Namespace)
|
namespace := getRequestNamespace(req.Namespace)
|
||||||
|
|
||||||
@ -64,8 +65,7 @@ func MakeUpdateHandler(client *containerd.Client, cni gocni.CNI, secretMountPath
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = validateSecrets(namespaceSecretMountPath, req.Secrets)
|
if err = validateSecrets(namespaceSecretMountPath, req.Secrets); err != nil {
|
||||||
if err != nil {
|
|
||||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,13 +83,15 @@ func MakeUpdateHandler(client *containerd.Client, cni gocni.CNI, secretMountPath
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := service.Remove(ctx, client, name); err != nil {
|
killTimeout := getKillTimeout(function.annotations)
|
||||||
|
|
||||||
|
if err := service.Remove(ctx, client, name, killTimeout); err != nil {
|
||||||
log.Printf("[Update] error removing %s, %s\n", name, err)
|
log.Printf("[Update] error removing %s, %s\n", name, err)
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// The pull has already been done in prepull, so we can force this pull to "false"
|
// The pull has already been done in pre-pull, so we can force this pull to "false"
|
||||||
pull := false
|
pull := false
|
||||||
|
|
||||||
if err := deploy(ctx, req, client, cni, namespaceSecretMountPath, pull); err != nil {
|
if err := deploy(ctx, req, client, cni, namespaceSecretMountPath, pull); err != nil {
|
||||||
|
@ -22,78 +22,84 @@ import (
|
|||||||
const dockerConfigDir = "/var/lib/faasd/.docker/"
|
const dockerConfigDir = "/var/lib/faasd/.docker/"
|
||||||
|
|
||||||
// Remove removes a container
|
// Remove removes a container
|
||||||
func Remove(ctx context.Context, client *containerd.Client, name string) error {
|
func Remove(ctx context.Context, client *containerd.Client, name string, killTimeout time.Duration) error {
|
||||||
|
|
||||||
container, containerErr := client.LoadContainer(ctx, name)
|
container, err := client.LoadContainer(ctx, name)
|
||||||
|
if err != nil {
|
||||||
if containerErr == nil {
|
// Perhaps the container was already removed, but the snapshot is still there
|
||||||
taskFound := true
|
|
||||||
t, err := container.Task(ctx, nil)
|
|
||||||
if err != nil {
|
|
||||||
if errdefs.IsNotFound(err) {
|
|
||||||
taskFound = false
|
|
||||||
} else {
|
|
||||||
return fmt.Errorf("unable to get task %w: ", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if taskFound {
|
|
||||||
status, err := t.Status(ctx)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Unable to get status for: %s, error: %s", name, err.Error())
|
|
||||||
} else {
|
|
||||||
log.Printf("Status of %s is: %s\n", name, status.Status)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Printf("Need to kill task: %s\n", name)
|
|
||||||
if err = killTask(ctx, t); err != nil {
|
|
||||||
return fmt.Errorf("error killing task %s, %s, %w", container.ID(), name, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := container.Delete(ctx, containerd.WithSnapshotCleanup); err != nil {
|
|
||||||
return fmt.Errorf("error deleting container %s, %s, %w", container.ID(), name, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
service := client.SnapshotService("")
|
service := client.SnapshotService("")
|
||||||
key := name + "snapshot"
|
key := name + "snapshot"
|
||||||
|
|
||||||
|
// Don't return an error if the snapshot doesn't exist
|
||||||
if _, err := client.SnapshotService("").Stat(ctx, key); err == nil {
|
if _, err := client.SnapshotService("").Stat(ctx, key); err == nil {
|
||||||
service.Remove(ctx, key)
|
service.Remove(ctx, key)
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
taskFound := true
|
||||||
|
t, err := container.Task(ctx, nil)
|
||||||
|
if err != nil {
|
||||||
|
if errdefs.IsNotFound(err) {
|
||||||
|
taskFound = false
|
||||||
|
} else {
|
||||||
|
return fmt.Errorf("unable to get task %w: ", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if taskFound {
|
||||||
|
status, err := t.Status(ctx)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Unable to get status for: %s, error: %s", name, err.Error())
|
||||||
|
} else {
|
||||||
|
log.Printf("Status of %s is: %s\n", name, status.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = killTask(ctx, t, killTimeout); err != nil {
|
||||||
|
return fmt.Errorf("error killing task %s, %s, %w", container.ID(), name, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := container.Delete(ctx, containerd.WithSnapshotCleanup); err != nil {
|
||||||
|
return fmt.Errorf("error deleting container %s, %s, %w", container.ID(), name, err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adapted from Stellar - https://github.com/stellar
|
// Adapted from Stellar - https://github.com/stellarproject
|
||||||
func killTask(ctx context.Context, task containerd.Task) error {
|
func killTask(ctx context.Context, task containerd.Task, killTimeout time.Duration) error {
|
||||||
|
|
||||||
killTimeout := 30 * time.Second
|
|
||||||
|
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
id := task.ID()
|
||||||
|
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if task != nil {
|
if task != nil {
|
||||||
wait, err := task.Wait(ctx)
|
wait, err := task.Wait(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error waiting on task: %s", err)
|
log.Printf("error waiting on task: %s: %s", id, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := task.Kill(ctx, unix.SIGTERM, containerd.WithKillAll); err != nil {
|
if err := task.Kill(ctx, unix.SIGTERM, containerd.WithKillAll); err != nil {
|
||||||
log.Printf("error killing container task: %s", err)
|
log.Printf("error killing task: %s with SIGTERM: %s", id, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-wait:
|
case <-wait:
|
||||||
task.Delete(ctx)
|
_, err := task.Delete(ctx)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error deleting task: %s: %s", id, err)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
case <-time.After(killTimeout):
|
case <-time.After(killTimeout):
|
||||||
if err := task.Kill(ctx, unix.SIGKILL, containerd.WithKillAll); err != nil {
|
if err := task.Kill(ctx, unix.SIGKILL, containerd.WithKillAll); err != nil {
|
||||||
log.Printf("error force killing container task: %s", err)
|
log.Printf("error killing task: %s with SIGTERM: %s", id, err)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/alexellis/arkade/pkg/env"
|
"github.com/alexellis/arkade/pkg/env"
|
||||||
"github.com/compose-spec/compose-go/loader"
|
"github.com/compose-spec/compose-go/loader"
|
||||||
@ -32,6 +33,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
// workingDirectoryPermission user read/write/execute, group and others: read-only
|
// workingDirectoryPermission user read/write/execute, group and others: read-only
|
||||||
workingDirectoryPermission = 0744
|
workingDirectoryPermission = 0744
|
||||||
|
removalGracePeriod = time.Second * 5
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
@ -126,9 +128,11 @@ func (s *Supervisor) Start(svcs []Service) error {
|
|||||||
|
|
||||||
for _, svc := range svcs {
|
for _, svc := range svcs {
|
||||||
fmt.Printf("Removing old container for: %s\n", svc.Name)
|
fmt.Printf("Removing old container for: %s\n", svc.Name)
|
||||||
containerErr := service.Remove(ctx, s.client, svc.Name)
|
if err := service.Remove(ctx,
|
||||||
if containerErr != nil {
|
s.client,
|
||||||
return containerErr
|
svc.Name,
|
||||||
|
removalGracePeriod); err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,8 +290,7 @@ func (s *Supervisor) Remove(svcs []Service) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = service.Remove(ctx, s.client, svc.Name)
|
if err := service.Remove(ctx, s.client, svc.Name, removalGracePeriod); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27
vendor/github.com/Microsoft/go-winio/.golangci.yml
generated
vendored
27
vendor/github.com/Microsoft/go-winio/.golangci.yml
generated
vendored
@ -8,8 +8,12 @@ linters:
|
|||||||
- containedctx # struct contains a context
|
- containedctx # struct contains a context
|
||||||
- dupl # duplicate code
|
- dupl # duplicate code
|
||||||
- errname # erorrs are named correctly
|
- errname # erorrs are named correctly
|
||||||
|
- goconst # strings that should be constants
|
||||||
|
- godot # comments end in a period
|
||||||
|
- misspell
|
||||||
- nolintlint # "//nolint" directives are properly explained
|
- nolintlint # "//nolint" directives are properly explained
|
||||||
- revive # golint replacement
|
- revive # golint replacement
|
||||||
|
- stylecheck # golint replacement, less configurable than revive
|
||||||
- unconvert # unnecessary conversions
|
- unconvert # unnecessary conversions
|
||||||
- wastedassign
|
- wastedassign
|
||||||
|
|
||||||
@ -19,7 +23,10 @@ linters:
|
|||||||
- exhaustive # check exhaustiveness of enum switch statements
|
- exhaustive # check exhaustiveness of enum switch statements
|
||||||
- gofmt # files are gofmt'ed
|
- gofmt # files are gofmt'ed
|
||||||
- gosec # security
|
- gosec # security
|
||||||
|
- nestif # deeply nested ifs
|
||||||
- nilerr # returns nil even with non-nil error
|
- nilerr # returns nil even with non-nil error
|
||||||
|
- prealloc # slices that can be pre-allocated
|
||||||
|
- structcheck # unused struct fields
|
||||||
- unparam # unused function params
|
- unparam # unused function params
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
@ -35,18 +42,6 @@ issues:
|
|||||||
text: "^line-length-limit: "
|
text: "^line-length-limit: "
|
||||||
source: "^//(go:generate|sys) "
|
source: "^//(go:generate|sys) "
|
||||||
|
|
||||||
#TODO: remove after upgrading to go1.18
|
|
||||||
# ignore comment spacing for nolint and sys directives
|
|
||||||
- linters:
|
|
||||||
- revive
|
|
||||||
text: "^comment-spacings: no space between comment delimiter and comment text"
|
|
||||||
source: "//(cspell:|nolint:|sys |todo)"
|
|
||||||
|
|
||||||
# not on go 1.18 yet, so no any
|
|
||||||
- linters:
|
|
||||||
- revive
|
|
||||||
text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'"
|
|
||||||
|
|
||||||
# allow unjustified ignores of error checks in defer statements
|
# allow unjustified ignores of error checks in defer statements
|
||||||
- linters:
|
- linters:
|
||||||
- nolintlint
|
- nolintlint
|
||||||
@ -61,8 +56,6 @@ issues:
|
|||||||
|
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
exhaustive:
|
|
||||||
default-signifies-exhaustive: true
|
|
||||||
govet:
|
govet:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
@ -105,8 +98,6 @@ linters-settings:
|
|||||||
disabled: true
|
disabled: true
|
||||||
- name: flag-parameter # excessive, and a common idiom we use
|
- name: flag-parameter # excessive, and a common idiom we use
|
||||||
disabled: true
|
disabled: true
|
||||||
- name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead
|
|
||||||
disabled: true
|
|
||||||
# general config
|
# general config
|
||||||
- name: line-length-limit
|
- name: line-length-limit
|
||||||
arguments:
|
arguments:
|
||||||
@ -147,3 +138,7 @@ linters-settings:
|
|||||||
- VPCI
|
- VPCI
|
||||||
- WCOW
|
- WCOW
|
||||||
- WIM
|
- WIM
|
||||||
|
stylecheck:
|
||||||
|
checks:
|
||||||
|
- "all"
|
||||||
|
- "-ST1003" # use revive's var naming
|
||||||
|
6
vendor/github.com/Microsoft/go-winio/hvsock.go
generated
vendored
6
vendor/github.com/Microsoft/go-winio/hvsock.go
generated
vendored
@ -23,7 +23,7 @@ import (
|
|||||||
const afHVSock = 34 // AF_HYPERV
|
const afHVSock = 34 // AF_HYPERV
|
||||||
|
|
||||||
// Well known Service and VM IDs
|
// Well known Service and VM IDs
|
||||||
// https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards
|
//https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards
|
||||||
|
|
||||||
// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.
|
// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.
|
||||||
func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
|
func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
|
||||||
@ -31,7 +31,7 @@ func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.
|
// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.
|
||||||
func HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff
|
func HvsockGUIDBroadcast() guid.GUID { //ffffffff-ffff-ffff-ffff-ffffffffffff
|
||||||
return guid.GUID{
|
return guid.GUID{
|
||||||
Data1: 0xffffffff,
|
Data1: 0xffffffff,
|
||||||
Data2: 0xffff,
|
Data2: 0xffff,
|
||||||
@ -246,7 +246,7 @@ func (l *HvsockListener) Accept() (_ net.Conn, err error) {
|
|||||||
var addrbuf [addrlen * 2]byte
|
var addrbuf [addrlen * 2]byte
|
||||||
|
|
||||||
var bytes uint32
|
var bytes uint32
|
||||||
err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o)
|
err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /*rxdatalen*/, addrlen, addrlen, &bytes, &c.o)
|
||||||
if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {
|
if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {
|
||||||
return nil, l.opErr("accept", os.NewSyscallError("acceptex", err))
|
return nil, l.opErr("accept", os.NewSyscallError("acceptex", err))
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/Microsoft/go-winio/internal/fs/doc.go
generated
vendored
2
vendor/github.com/Microsoft/go-winio/internal/fs/doc.go
generated
vendored
@ -1,2 +0,0 @@
|
|||||||
// This package contains Win32 filesystem functionality.
|
|
||||||
package fs
|
|
202
vendor/github.com/Microsoft/go-winio/internal/fs/fs.go
generated
vendored
202
vendor/github.com/Microsoft/go-winio/internal/fs/fs.go
generated
vendored
@ -1,202 +0,0 @@
|
|||||||
//go:build windows
|
|
||||||
|
|
||||||
package fs
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golang.org/x/sys/windows"
|
|
||||||
|
|
||||||
"github.com/Microsoft/go-winio/internal/stringbuffer"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go
|
|
||||||
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew
|
|
||||||
//sys CreateFile(name string, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateFileW
|
|
||||||
|
|
||||||
const NullHandle windows.Handle = 0
|
|
||||||
|
|
||||||
// AccessMask defines standard, specific, and generic rights.
|
|
||||||
//
|
|
||||||
// Bitmask:
|
|
||||||
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
|
||||||
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
|
||||||
// +---------------+---------------+-------------------------------+
|
|
||||||
// |G|G|G|G|Resvd|A| StandardRights| SpecificRights |
|
|
||||||
// |R|W|E|A| |S| | |
|
|
||||||
// +-+-------------+---------------+-------------------------------+
|
|
||||||
//
|
|
||||||
// GR Generic Read
|
|
||||||
// GW Generic Write
|
|
||||||
// GE Generic Exectue
|
|
||||||
// GA Generic All
|
|
||||||
// Resvd Reserved
|
|
||||||
// AS Access Security System
|
|
||||||
//
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask
|
|
||||||
//
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights
|
|
||||||
//
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants
|
|
||||||
type AccessMask = windows.ACCESS_MASK
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const (
|
|
||||||
// Not actually any.
|
|
||||||
//
|
|
||||||
// For CreateFile: "query certain metadata such as file, directory, or device attributes without accessing that file or device"
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters
|
|
||||||
FILE_ANY_ACCESS AccessMask = 0
|
|
||||||
|
|
||||||
// Specific Object Access
|
|
||||||
// from ntioapi.h
|
|
||||||
|
|
||||||
FILE_READ_DATA AccessMask = (0x0001) // file & pipe
|
|
||||||
FILE_LIST_DIRECTORY AccessMask = (0x0001) // directory
|
|
||||||
|
|
||||||
FILE_WRITE_DATA AccessMask = (0x0002) // file & pipe
|
|
||||||
FILE_ADD_FILE AccessMask = (0x0002) // directory
|
|
||||||
|
|
||||||
FILE_APPEND_DATA AccessMask = (0x0004) // file
|
|
||||||
FILE_ADD_SUBDIRECTORY AccessMask = (0x0004) // directory
|
|
||||||
FILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe
|
|
||||||
|
|
||||||
FILE_READ_EA AccessMask = (0x0008) // file & directory
|
|
||||||
FILE_READ_PROPERTIES AccessMask = FILE_READ_EA
|
|
||||||
|
|
||||||
FILE_WRITE_EA AccessMask = (0x0010) // file & directory
|
|
||||||
FILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA
|
|
||||||
|
|
||||||
FILE_EXECUTE AccessMask = (0x0020) // file
|
|
||||||
FILE_TRAVERSE AccessMask = (0x0020) // directory
|
|
||||||
|
|
||||||
FILE_DELETE_CHILD AccessMask = (0x0040) // directory
|
|
||||||
|
|
||||||
FILE_READ_ATTRIBUTES AccessMask = (0x0080) // all
|
|
||||||
|
|
||||||
FILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all
|
|
||||||
|
|
||||||
FILE_ALL_ACCESS AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
|
|
||||||
FILE_GENERIC_READ AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)
|
|
||||||
FILE_GENERIC_WRITE AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)
|
|
||||||
FILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
|
|
||||||
|
|
||||||
SPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF
|
|
||||||
|
|
||||||
// Standard Access
|
|
||||||
// from ntseapi.h
|
|
||||||
|
|
||||||
DELETE AccessMask = 0x0001_0000
|
|
||||||
READ_CONTROL AccessMask = 0x0002_0000
|
|
||||||
WRITE_DAC AccessMask = 0x0004_0000
|
|
||||||
WRITE_OWNER AccessMask = 0x0008_0000
|
|
||||||
SYNCHRONIZE AccessMask = 0x0010_0000
|
|
||||||
|
|
||||||
STANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000
|
|
||||||
|
|
||||||
STANDARD_RIGHTS_READ AccessMask = READ_CONTROL
|
|
||||||
STANDARD_RIGHTS_WRITE AccessMask = READ_CONTROL
|
|
||||||
STANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL
|
|
||||||
|
|
||||||
STANDARD_RIGHTS_ALL AccessMask = 0x001F_0000
|
|
||||||
)
|
|
||||||
|
|
||||||
type FileShareMode uint32
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const (
|
|
||||||
FILE_SHARE_NONE FileShareMode = 0x00
|
|
||||||
FILE_SHARE_READ FileShareMode = 0x01
|
|
||||||
FILE_SHARE_WRITE FileShareMode = 0x02
|
|
||||||
FILE_SHARE_DELETE FileShareMode = 0x04
|
|
||||||
FILE_SHARE_VALID_FLAGS FileShareMode = 0x07
|
|
||||||
)
|
|
||||||
|
|
||||||
type FileCreationDisposition uint32
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const (
|
|
||||||
// from winbase.h
|
|
||||||
|
|
||||||
CREATE_NEW FileCreationDisposition = 0x01
|
|
||||||
CREATE_ALWAYS FileCreationDisposition = 0x02
|
|
||||||
OPEN_EXISTING FileCreationDisposition = 0x03
|
|
||||||
OPEN_ALWAYS FileCreationDisposition = 0x04
|
|
||||||
TRUNCATE_EXISTING FileCreationDisposition = 0x05
|
|
||||||
)
|
|
||||||
|
|
||||||
// CreateFile and co. take flags or attributes together as one parameter.
|
|
||||||
// Define alias until we can use generics to allow both
|
|
||||||
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
|
|
||||||
type FileFlagOrAttribute uint32
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const ( // from winnt.h
|
|
||||||
FILE_FLAG_WRITE_THROUGH FileFlagOrAttribute = 0x8000_0000
|
|
||||||
FILE_FLAG_OVERLAPPED FileFlagOrAttribute = 0x4000_0000
|
|
||||||
FILE_FLAG_NO_BUFFERING FileFlagOrAttribute = 0x2000_0000
|
|
||||||
FILE_FLAG_RANDOM_ACCESS FileFlagOrAttribute = 0x1000_0000
|
|
||||||
FILE_FLAG_SEQUENTIAL_SCAN FileFlagOrAttribute = 0x0800_0000
|
|
||||||
FILE_FLAG_DELETE_ON_CLOSE FileFlagOrAttribute = 0x0400_0000
|
|
||||||
FILE_FLAG_BACKUP_SEMANTICS FileFlagOrAttribute = 0x0200_0000
|
|
||||||
FILE_FLAG_POSIX_SEMANTICS FileFlagOrAttribute = 0x0100_0000
|
|
||||||
FILE_FLAG_OPEN_REPARSE_POINT FileFlagOrAttribute = 0x0020_0000
|
|
||||||
FILE_FLAG_OPEN_NO_RECALL FileFlagOrAttribute = 0x0010_0000
|
|
||||||
FILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000
|
|
||||||
)
|
|
||||||
|
|
||||||
type FileSQSFlag = FileFlagOrAttribute
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const ( // from winbase.h
|
|
||||||
SECURITY_ANONYMOUS FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16)
|
|
||||||
SECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16)
|
|
||||||
SECURITY_IMPERSONATION FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16)
|
|
||||||
SECURITY_DELEGATION FileSQSFlag = FileSQSFlag(SecurityDelegation << 16)
|
|
||||||
|
|
||||||
SECURITY_SQOS_PRESENT FileSQSFlag = 0x00100000
|
|
||||||
SECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F0000
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetFinalPathNameByHandle flags
|
|
||||||
//
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters
|
|
||||||
type GetFinalPathFlag uint32
|
|
||||||
|
|
||||||
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
|
|
||||||
const (
|
|
||||||
GetFinalPathDefaultFlag GetFinalPathFlag = 0x0
|
|
||||||
|
|
||||||
FILE_NAME_NORMALIZED GetFinalPathFlag = 0x0
|
|
||||||
FILE_NAME_OPENED GetFinalPathFlag = 0x8
|
|
||||||
|
|
||||||
VOLUME_NAME_DOS GetFinalPathFlag = 0x0
|
|
||||||
VOLUME_NAME_GUID GetFinalPathFlag = 0x1
|
|
||||||
VOLUME_NAME_NT GetFinalPathFlag = 0x2
|
|
||||||
VOLUME_NAME_NONE GetFinalPathFlag = 0x4
|
|
||||||
)
|
|
||||||
|
|
||||||
// getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle
|
|
||||||
// with the given handle and flags. It transparently takes care of creating a buffer of the
|
|
||||||
// correct size for the call.
|
|
||||||
//
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew
|
|
||||||
func GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) {
|
|
||||||
b := stringbuffer.NewWString()
|
|
||||||
//TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n?
|
|
||||||
for {
|
|
||||||
n, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags))
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
// If the buffer wasn't large enough, n will be the total size needed (including null terminator).
|
|
||||||
// Resize and try again.
|
|
||||||
if n > b.Cap() {
|
|
||||||
b.ResizeTo(n)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
// If the buffer is large enough, n will be the size not including the null terminator.
|
|
||||||
// Convert to a Go string and return.
|
|
||||||
return b.String(), nil
|
|
||||||
}
|
|
||||||
}
|
|
12
vendor/github.com/Microsoft/go-winio/internal/fs/security.go
generated
vendored
12
vendor/github.com/Microsoft/go-winio/internal/fs/security.go
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
package fs
|
|
||||||
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level
|
|
||||||
type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32`
|
|
||||||
|
|
||||||
// Impersonation levels
|
|
||||||
const (
|
|
||||||
SecurityAnonymous SecurityImpersonationLevel = 0
|
|
||||||
SecurityIdentification SecurityImpersonationLevel = 1
|
|
||||||
SecurityImpersonation SecurityImpersonationLevel = 2
|
|
||||||
SecurityDelegation SecurityImpersonationLevel = 3
|
|
||||||
)
|
|
64
vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go
generated
vendored
64
vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go
generated
vendored
@ -1,64 +0,0 @@
|
|||||||
//go:build windows
|
|
||||||
|
|
||||||
// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
|
|
||||||
|
|
||||||
package fs
|
|
||||||
|
|
||||||
import (
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
|
||||||
)
|
|
||||||
|
|
||||||
var _ unsafe.Pointer
|
|
||||||
|
|
||||||
// Do the interface allocations only once for common
|
|
||||||
// Errno values.
|
|
||||||
const (
|
|
||||||
errnoERROR_IO_PENDING = 997
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
|
|
||||||
errERROR_EINVAL error = syscall.EINVAL
|
|
||||||
)
|
|
||||||
|
|
||||||
// errnoErr returns common boxed Errno values, to prevent
|
|
||||||
// allocations at runtime.
|
|
||||||
func errnoErr(e syscall.Errno) error {
|
|
||||||
switch e {
|
|
||||||
case 0:
|
|
||||||
return errERROR_EINVAL
|
|
||||||
case errnoERROR_IO_PENDING:
|
|
||||||
return errERROR_IO_PENDING
|
|
||||||
}
|
|
||||||
// TODO: add more here, after collecting data on the common
|
|
||||||
// error values see on Windows. (perhaps when running
|
|
||||||
// all.bat?)
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
|
|
||||||
|
|
||||||
procCreateFileW = modkernel32.NewProc("CreateFileW")
|
|
||||||
)
|
|
||||||
|
|
||||||
func CreateFile(name string, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
|
|
||||||
var _p0 *uint16
|
|
||||||
_p0, err = syscall.UTF16PtrFromString(name)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
|
|
||||||
r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
|
|
||||||
handle = windows.Handle(r0)
|
|
||||||
if handle == windows.InvalidHandle {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
4
vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
generated
vendored
4
vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
generated
vendored
@ -100,8 +100,8 @@ func (f *runtimeFunc) Load() error {
|
|||||||
(*byte)(unsafe.Pointer(&f.addr)),
|
(*byte)(unsafe.Pointer(&f.addr)),
|
||||||
uint32(unsafe.Sizeof(f.addr)),
|
uint32(unsafe.Sizeof(f.addr)),
|
||||||
&n,
|
&n,
|
||||||
nil, // overlapped
|
nil, //overlapped
|
||||||
0, // completionRoutine
|
0, //completionRoutine
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
return f.err
|
return f.err
|
||||||
|
132
vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go
generated
vendored
132
vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go
generated
vendored
@ -1,132 +0,0 @@
|
|||||||
package stringbuffer
|
|
||||||
|
|
||||||
import (
|
|
||||||
"sync"
|
|
||||||
"unicode/utf16"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TODO: worth exporting and using in mkwinsyscall?
|
|
||||||
|
|
||||||
// Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate
|
|
||||||
// large path strings:
|
|
||||||
// MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310.
|
|
||||||
const MinWStringCap = 310
|
|
||||||
|
|
||||||
// use *[]uint16 since []uint16 creates an extra allocation where the slice header
|
|
||||||
// is copied to heap and then referenced via pointer in the interface header that sync.Pool
|
|
||||||
// stores.
|
|
||||||
var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly
|
|
||||||
New: func() interface{} {
|
|
||||||
b := make([]uint16, MinWStringCap)
|
|
||||||
return &b
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
func newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) }
|
|
||||||
|
|
||||||
// freeBuffer copies the slice header data, and puts a pointer to that in the pool.
|
|
||||||
// This avoids taking a pointer to the slice header in WString, which can be set to nil.
|
|
||||||
func freeBuffer(b []uint16) { pathPool.Put(&b) }
|
|
||||||
|
|
||||||
// WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings
|
|
||||||
// for interacting with Win32 APIs.
|
|
||||||
// Sizes are specified as uint32 and not int.
|
|
||||||
//
|
|
||||||
// It is not thread safe.
|
|
||||||
type WString struct {
|
|
||||||
// type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future.
|
|
||||||
|
|
||||||
// raw buffer
|
|
||||||
b []uint16
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewWString returns a [WString] allocated from a shared pool with an
|
|
||||||
// initial capacity of at least [MinWStringCap].
|
|
||||||
// Since the buffer may have been previously used, its contents are not guaranteed to be empty.
|
|
||||||
//
|
|
||||||
// The buffer should be freed via [WString.Free]
|
|
||||||
func NewWString() *WString {
|
|
||||||
return &WString{
|
|
||||||
b: newBuffer(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *WString) Free() {
|
|
||||||
if b.empty() {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
freeBuffer(b.b)
|
|
||||||
b.b = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResizeTo grows the buffer to at least c and returns the new capacity, freeing the
|
|
||||||
// previous buffer back into pool.
|
|
||||||
func (b *WString) ResizeTo(c uint32) uint32 {
|
|
||||||
// allready sufficient (or n is 0)
|
|
||||||
if c <= b.Cap() {
|
|
||||||
return b.Cap()
|
|
||||||
}
|
|
||||||
|
|
||||||
if c <= MinWStringCap {
|
|
||||||
c = MinWStringCap
|
|
||||||
}
|
|
||||||
// allocate at-least double buffer size, as is done in [bytes.Buffer] and other places
|
|
||||||
if c <= 2*b.Cap() {
|
|
||||||
c = 2 * b.Cap()
|
|
||||||
}
|
|
||||||
|
|
||||||
b2 := make([]uint16, c)
|
|
||||||
if !b.empty() {
|
|
||||||
copy(b2, b.b)
|
|
||||||
freeBuffer(b.b)
|
|
||||||
}
|
|
||||||
b.b = b2
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buffer returns the underlying []uint16 buffer.
|
|
||||||
func (b *WString) Buffer() []uint16 {
|
|
||||||
if b.empty() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return b.b
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pointer returns a pointer to the first uint16 in the buffer.
|
|
||||||
// If the [WString.Free] has already been called, the pointer will be nil.
|
|
||||||
func (b *WString) Pointer() *uint16 {
|
|
||||||
if b.empty() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return &b.b[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer.
|
|
||||||
//
|
|
||||||
// It assumes that the data is null-terminated.
|
|
||||||
func (b *WString) String() string {
|
|
||||||
// Using [windows.UTF16ToString] would require importing "golang.org/x/sys/windows"
|
|
||||||
// and would make this code Windows-only, which makes no sense.
|
|
||||||
// So copy UTF16ToString code into here.
|
|
||||||
// If other windows-specific code is added, switch to [windows.UTF16ToString]
|
|
||||||
|
|
||||||
s := b.b
|
|
||||||
for i, v := range s {
|
|
||||||
if v == 0 {
|
|
||||||
s = s[:i]
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return string(utf16.Decode(s))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cap returns the underlying buffer capacity.
|
|
||||||
func (b *WString) Cap() uint32 {
|
|
||||||
if b.empty() {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return b.cap()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *WString) cap() uint32 { return uint32(cap(b.b)) }
|
|
||||||
func (b *WString) empty() bool { return b == nil || b.cap() == 0 }
|
|
22
vendor/github.com/Microsoft/go-winio/pipe.go
generated
vendored
22
vendor/github.com/Microsoft/go-winio/pipe.go
generated
vendored
@ -16,12 +16,11 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
|
|
||||||
"github.com/Microsoft/go-winio/internal/fs"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
|
//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
|
||||||
//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateNamedPipeW
|
//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateNamedPipeW
|
||||||
|
//sys createFile(name string, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateFileW
|
||||||
//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
|
//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
|
||||||
//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
|
//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
|
||||||
//sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc
|
//sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc
|
||||||
@ -164,21 +163,19 @@ func (s pipeAddress) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
|
// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
|
||||||
func tryDialPipe(ctx context.Context, path *string, access fs.AccessMask) (syscall.Handle, error) {
|
func tryDialPipe(ctx context.Context, path *string, access uint32) (syscall.Handle, error) {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return syscall.Handle(0), ctx.Err()
|
return syscall.Handle(0), ctx.Err()
|
||||||
default:
|
default:
|
||||||
wh, err := fs.CreateFile(*path,
|
h, err := createFile(*path,
|
||||||
access,
|
access,
|
||||||
0, // mode
|
0,
|
||||||
nil, // security attributes
|
nil,
|
||||||
fs.OPEN_EXISTING,
|
syscall.OPEN_EXISTING,
|
||||||
fs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.SECURITY_ANONYMOUS,
|
windows.FILE_FLAG_OVERLAPPED|windows.SECURITY_SQOS_PRESENT|windows.SECURITY_ANONYMOUS,
|
||||||
0, // template file handle
|
0)
|
||||||
)
|
|
||||||
h := syscall.Handle(wh)
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return h, nil
|
return h, nil
|
||||||
}
|
}
|
||||||
@ -222,7 +219,7 @@ func DialPipeContext(ctx context.Context, path string) (net.Conn, error) {
|
|||||||
func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
|
func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
|
||||||
var err error
|
var err error
|
||||||
var h syscall.Handle
|
var h syscall.Handle
|
||||||
h, err = tryDialPipe(ctx, &path, fs.AccessMask(access))
|
h, err = tryDialPipe(ctx, &path, access)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -282,7 +279,6 @@ func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (sy
|
|||||||
}
|
}
|
||||||
defer localFree(ntPath.Buffer)
|
defer localFree(ntPath.Buffer)
|
||||||
oa.ObjectName = &ntPath
|
oa.ObjectName = &ntPath
|
||||||
oa.Attributes = windows.OBJ_CASE_INSENSITIVE
|
|
||||||
|
|
||||||
// The security descriptor is only needed for the first pipe.
|
// The security descriptor is only needed for the first pipe.
|
||||||
if first {
|
if first {
|
||||||
|
85
vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/mkwinsyscall.go
generated
vendored
85
vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/mkwinsyscall.go
generated
vendored
@ -477,14 +477,15 @@ func newFn(s string) (*Fn, error) {
|
|||||||
return nil, errors.New("Could not extract dll name from \"" + f.src + "\"")
|
return nil, errors.New("Could not extract dll name from \"" + f.src + "\"")
|
||||||
}
|
}
|
||||||
s = trim(s[1:])
|
s = trim(s[1:])
|
||||||
if i := strings.LastIndex(s, "."); i >= 0 {
|
a := strings.Split(s, ".")
|
||||||
f.dllname = s[:i]
|
switch len(a) {
|
||||||
f.dllfuncname = s[i+1:]
|
case 1:
|
||||||
} else {
|
f.dllfuncname = a[0]
|
||||||
f.dllfuncname = s
|
case 2:
|
||||||
}
|
f.dllname = a[0]
|
||||||
if f.dllfuncname == "" {
|
f.dllfuncname = a[1]
|
||||||
return nil, fmt.Errorf("function name is not specified in %q", s)
|
default:
|
||||||
|
return nil, errors.New("Could not extract dll name from \"" + f.src + "\"")
|
||||||
}
|
}
|
||||||
if n := f.dllfuncname; endsIn(n, '?') {
|
if n := f.dllfuncname; endsIn(n, '?') {
|
||||||
f.dllfuncname = n[:len(n)-1]
|
f.dllfuncname = n[:len(n)-1]
|
||||||
@ -501,23 +502,7 @@ func (f *Fn) DLLName() string {
|
|||||||
return f.dllname
|
return f.dllname
|
||||||
}
|
}
|
||||||
|
|
||||||
// DLLVar returns a valid Go identifier that represents DLLName.
|
// DLLName returns DLL function name for function f.
|
||||||
func (f *Fn) DLLVar() string {
|
|
||||||
id := strings.Map(func(r rune) rune {
|
|
||||||
switch r {
|
|
||||||
case '.', '-':
|
|
||||||
return '_'
|
|
||||||
default:
|
|
||||||
return r
|
|
||||||
}
|
|
||||||
}, f.DLLName())
|
|
||||||
if !token.IsIdentifier(id) {
|
|
||||||
panic(fmt.Errorf("could not create Go identifier for DLLName %q", f.DLLName()))
|
|
||||||
}
|
|
||||||
return id
|
|
||||||
}
|
|
||||||
|
|
||||||
// DLLFuncName returns DLL function name for function f.
|
|
||||||
func (f *Fn) DLLFuncName() string {
|
func (f *Fn) DLLFuncName() string {
|
||||||
if f.dllfuncname == "" {
|
if f.dllfuncname == "" {
|
||||||
return f.Name
|
return f.Name
|
||||||
@ -663,13 +648,6 @@ func (f *Fn) HelperName() string {
|
|||||||
return "_" + f.Name
|
return "_" + f.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
// DLL is a DLL's filename and a string that is valid in a Go identifier that should be used when
|
|
||||||
// naming a variable that refers to the DLL.
|
|
||||||
type DLL struct {
|
|
||||||
Name string
|
|
||||||
Var string
|
|
||||||
}
|
|
||||||
|
|
||||||
// Source files and functions.
|
// Source files and functions.
|
||||||
type Source struct {
|
type Source struct {
|
||||||
Funcs []*Fn
|
Funcs []*Fn
|
||||||
@ -719,20 +697,18 @@ func ParseFiles(fs []string) (*Source, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DLLs return dll names for a source set src.
|
// DLLs return dll names for a source set src.
|
||||||
func (src *Source) DLLs() []DLL {
|
func (src *Source) DLLs() []string {
|
||||||
uniq := make(map[string]bool)
|
uniq := make(map[string]bool)
|
||||||
r := make([]DLL, 0)
|
r := make([]string, 0)
|
||||||
for _, f := range src.Funcs {
|
for _, f := range src.Funcs {
|
||||||
id := f.DLLVar()
|
name := f.DLLName()
|
||||||
if _, found := uniq[id]; !found {
|
if _, found := uniq[name]; !found {
|
||||||
uniq[id] = true
|
uniq[name] = true
|
||||||
r = append(r, DLL{f.DLLName(), id})
|
r = append(r, name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if *sortdecls {
|
if *sortdecls {
|
||||||
sort.Slice(r, func(i, j int) bool {
|
sort.Strings(r)
|
||||||
return r[i].Var < r[j].Var
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
@ -902,22 +878,6 @@ func (src *Source) Generate(w io.Writer) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeTempSourceFile(data []byte) (string, error) {
|
|
||||||
f, err := os.CreateTemp("", "mkwinsyscall-generated-*.go")
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
_, err = f.Write(data)
|
|
||||||
if closeErr := f.Close(); err == nil {
|
|
||||||
err = closeErr
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
os.Remove(f.Name()) // best effort
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return f.Name(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func usage() {
|
func usage() {
|
||||||
fmt.Fprintf(os.Stderr, "usage: mkwinsyscall [flags] [path ...]\n")
|
fmt.Fprintf(os.Stderr, "usage: mkwinsyscall [flags] [path ...]\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
@ -944,12 +904,7 @@ func main() {
|
|||||||
|
|
||||||
data, err := format.Source(buf.Bytes())
|
data, err := format.Source(buf.Bytes())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("failed to format source: %v", err)
|
log.Fatal(err)
|
||||||
f, err := writeTempSourceFile(buf.Bytes())
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to write unformatted source to file: %v", err)
|
|
||||||
}
|
|
||||||
log.Fatalf("for diagnosis, wrote unformatted source to %v", f)
|
|
||||||
}
|
}
|
||||||
if *filename == "" {
|
if *filename == "" {
|
||||||
_, err = os.Stdout.Write(data)
|
_, err = os.Stdout.Write(data)
|
||||||
@ -1015,10 +970,10 @@ var (
|
|||||||
|
|
||||||
{{/* help functions */}}
|
{{/* help functions */}}
|
||||||
|
|
||||||
{{define "dlls"}}{{range .DLLs}} mod{{.Var}} = {{newlazydll .Name}}
|
{{define "dlls"}}{{range .DLLs}} mod{{.}} = {{newlazydll .}}
|
||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
|
|
||||||
{{define "funcnames"}}{{range .DLLFuncNames}} proc{{.DLLFuncName}} = mod{{.DLLVar}}.NewProc("{{.DLLFuncName}}")
|
{{define "funcnames"}}{{range .DLLFuncNames}} proc{{.DLLFuncName}} = mod{{.DLLName}}.NewProc("{{.DLLFuncName}}")
|
||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
|
|
||||||
{{define "helperbody"}}
|
{{define "helperbody"}}
|
||||||
|
19
vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
generated
vendored
19
vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
generated
vendored
@ -63,6 +63,7 @@ var (
|
|||||||
procBackupWrite = modkernel32.NewProc("BackupWrite")
|
procBackupWrite = modkernel32.NewProc("BackupWrite")
|
||||||
procCancelIoEx = modkernel32.NewProc("CancelIoEx")
|
procCancelIoEx = modkernel32.NewProc("CancelIoEx")
|
||||||
procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
|
procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
|
||||||
|
procCreateFileW = modkernel32.NewProc("CreateFileW")
|
||||||
procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
|
procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
|
||||||
procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
|
procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
|
||||||
procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
|
procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
|
||||||
@ -304,6 +305,24 @@ func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func createFile(name string, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
|
||||||
|
var _p0 *uint16
|
||||||
|
_p0, err = syscall.UTF16PtrFromString(name)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return _createFile(_p0, access, mode, sa, createmode, attrs, templatefile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _createFile(name *uint16, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
|
||||||
|
r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
|
||||||
|
handle = syscall.Handle(r0)
|
||||||
|
if handle == syscall.InvalidHandle {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
|
func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
|
||||||
r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
|
r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
|
||||||
newport = syscall.Handle(r0)
|
newport = syscall.Handle(r0)
|
||||||
|
1
vendor/github.com/docker/cli/cli/config/configfile/file.go
generated
vendored
1
vendor/github.com/docker/cli/cli/config/configfile/file.go
generated
vendored
@ -37,6 +37,7 @@ type ConfigFile struct {
|
|||||||
PruneFilters []string `json:"pruneFilters,omitempty"`
|
PruneFilters []string `json:"pruneFilters,omitempty"`
|
||||||
Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
|
Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
|
||||||
Experimental string `json:"experimental,omitempty"`
|
Experimental string `json:"experimental,omitempty"`
|
||||||
|
StackOrchestrator string `json:"stackOrchestrator,omitempty"` // Deprecated: swarm is now the default orchestrator, and this option is ignored.
|
||||||
CurrentContext string `json:"currentContext,omitempty"`
|
CurrentContext string `json:"currentContext,omitempty"`
|
||||||
CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
|
CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
|
||||||
Plugins map[string]map[string]string `json:"plugins,omitempty"`
|
Plugins map[string]map[string]string `json:"plugins,omitempty"`
|
||||||
|
18
vendor/github.com/docker/docker/AUTHORS
generated
vendored
18
vendor/github.com/docker/docker/AUTHORS
generated
vendored
@ -29,7 +29,6 @@ Adam Pointer <adam.pointer@skybettingandgaming.com>
|
|||||||
Adam Singer <financeCoding@gmail.com>
|
Adam Singer <financeCoding@gmail.com>
|
||||||
Adam Walz <adam@adamwalz.net>
|
Adam Walz <adam@adamwalz.net>
|
||||||
Adam Williams <awilliams@mirantis.com>
|
Adam Williams <awilliams@mirantis.com>
|
||||||
AdamKorcz <adam@adalogics.com>
|
|
||||||
Addam Hardy <addam.hardy@gmail.com>
|
Addam Hardy <addam.hardy@gmail.com>
|
||||||
Aditi Rajagopal <arajagopal@us.ibm.com>
|
Aditi Rajagopal <arajagopal@us.ibm.com>
|
||||||
Aditya <aditya@netroy.in>
|
Aditya <aditya@netroy.in>
|
||||||
@ -82,7 +81,6 @@ Alex Goodman <wagoodman@gmail.com>
|
|||||||
Alex Nordlund <alexander.nordlund@nasdaq.com>
|
Alex Nordlund <alexander.nordlund@nasdaq.com>
|
||||||
Alex Olshansky <i@creagenics.com>
|
Alex Olshansky <i@creagenics.com>
|
||||||
Alex Samorukov <samm@os2.kiev.ua>
|
Alex Samorukov <samm@os2.kiev.ua>
|
||||||
Alex Stockinger <alex@atomicjar.com>
|
|
||||||
Alex Warhawk <ax.warhawk@gmail.com>
|
Alex Warhawk <ax.warhawk@gmail.com>
|
||||||
Alexander Artemenko <svetlyak.40wt@gmail.com>
|
Alexander Artemenko <svetlyak.40wt@gmail.com>
|
||||||
Alexander Boyd <alex@opengroove.org>
|
Alexander Boyd <alex@opengroove.org>
|
||||||
@ -200,7 +198,6 @@ Anusha Ragunathan <anusha.ragunathan@docker.com>
|
|||||||
Anyu Wang <wanganyu@outlook.com>
|
Anyu Wang <wanganyu@outlook.com>
|
||||||
apocas <petermdias@gmail.com>
|
apocas <petermdias@gmail.com>
|
||||||
Arash Deshmeh <adeshmeh@ca.ibm.com>
|
Arash Deshmeh <adeshmeh@ca.ibm.com>
|
||||||
arcosx <arcosx@outlook.com>
|
|
||||||
ArikaChen <eaglesora@gmail.com>
|
ArikaChen <eaglesora@gmail.com>
|
||||||
Arko Dasgupta <arko@tetrate.io>
|
Arko Dasgupta <arko@tetrate.io>
|
||||||
Arnaud Lefebvre <a.lefebvre@outlook.fr>
|
Arnaud Lefebvre <a.lefebvre@outlook.fr>
|
||||||
@ -244,7 +241,6 @@ Benjamin Atkin <ben@benatkin.com>
|
|||||||
Benjamin Baker <Benjamin.baker@utexas.edu>
|
Benjamin Baker <Benjamin.baker@utexas.edu>
|
||||||
Benjamin Boudreau <boudreau.benjamin@gmail.com>
|
Benjamin Boudreau <boudreau.benjamin@gmail.com>
|
||||||
Benjamin Böhmke <benjamin@boehmke.net>
|
Benjamin Böhmke <benjamin@boehmke.net>
|
||||||
Benjamin Wang <wachao@vmware.com>
|
|
||||||
Benjamin Yolken <yolken@stripe.com>
|
Benjamin Yolken <yolken@stripe.com>
|
||||||
Benny Ng <benny.tpng@gmail.com>
|
Benny Ng <benny.tpng@gmail.com>
|
||||||
Benoit Chesneau <bchesneau@gmail.com>
|
Benoit Chesneau <bchesneau@gmail.com>
|
||||||
@ -638,7 +634,6 @@ Eng Zer Jun <engzerjun@gmail.com>
|
|||||||
Enguerran <engcolson@gmail.com>
|
Enguerran <engcolson@gmail.com>
|
||||||
Eohyung Lee <liquidnuker@gmail.com>
|
Eohyung Lee <liquidnuker@gmail.com>
|
||||||
epeterso <epeterson@breakpoint-labs.com>
|
epeterso <epeterson@breakpoint-labs.com>
|
||||||
er0k <er0k@er0k.net>
|
|
||||||
Eric Barch <barch@tomesoftware.com>
|
Eric Barch <barch@tomesoftware.com>
|
||||||
Eric Curtin <ericcurtin17@gmail.com>
|
Eric Curtin <ericcurtin17@gmail.com>
|
||||||
Eric G. Noriega <enoriega@vizuri.com>
|
Eric G. Noriega <enoriega@vizuri.com>
|
||||||
@ -759,7 +754,6 @@ Félix Baylac-Jacqué <baylac.felix@gmail.com>
|
|||||||
Félix Cantournet <felix.cantournet@cloudwatt.com>
|
Félix Cantournet <felix.cantournet@cloudwatt.com>
|
||||||
Gabe Rosenhouse <gabe@missionst.com>
|
Gabe Rosenhouse <gabe@missionst.com>
|
||||||
Gabor Nagy <mail@aigeruth.hu>
|
Gabor Nagy <mail@aigeruth.hu>
|
||||||
Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
|
|
||||||
Gabriel Goller <gabrielgoller123@gmail.com>
|
Gabriel Goller <gabrielgoller123@gmail.com>
|
||||||
Gabriel L. Somlo <gsomlo@gmail.com>
|
Gabriel L. Somlo <gsomlo@gmail.com>
|
||||||
Gabriel Linder <linder.gabriel@gmail.com>
|
Gabriel Linder <linder.gabriel@gmail.com>
|
||||||
@ -861,7 +855,6 @@ Hongbin Lu <hongbin034@gmail.com>
|
|||||||
Hongxu Jia <hongxu.jia@windriver.com>
|
Hongxu Jia <hongxu.jia@windriver.com>
|
||||||
Honza Pokorny <me@honza.ca>
|
Honza Pokorny <me@honza.ca>
|
||||||
Hsing-Hui Hsu <hsinghui@amazon.com>
|
Hsing-Hui Hsu <hsinghui@amazon.com>
|
||||||
Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
|
|
||||||
hsinko <21551195@zju.edu.cn>
|
hsinko <21551195@zju.edu.cn>
|
||||||
Hu Keping <hukeping@huawei.com>
|
Hu Keping <hukeping@huawei.com>
|
||||||
Hu Tao <hutao@cn.fujitsu.com>
|
Hu Tao <hutao@cn.fujitsu.com>
|
||||||
@ -894,7 +887,6 @@ Igor Dolzhikov <bluesriverz@gmail.com>
|
|||||||
Igor Karpovich <i.karpovich@currencysolutions.com>
|
Igor Karpovich <i.karpovich@currencysolutions.com>
|
||||||
Iliana Weller <iweller@amazon.com>
|
Iliana Weller <iweller@amazon.com>
|
||||||
Ilkka Laukkanen <ilkka@ilkka.io>
|
Ilkka Laukkanen <ilkka@ilkka.io>
|
||||||
Illia Antypenko <ilya@antipenko.pp.ua>
|
|
||||||
Illo Abdulrahim <abdulrahim.illo@nokia.com>
|
Illo Abdulrahim <abdulrahim.illo@nokia.com>
|
||||||
Ilya Dmitrichenko <errordeveloper@gmail.com>
|
Ilya Dmitrichenko <errordeveloper@gmail.com>
|
||||||
Ilya Gusev <mail@igusev.ru>
|
Ilya Gusev <mail@igusev.ru>
|
||||||
@ -946,7 +938,6 @@ Jamie Hannaford <jamie@limetree.org>
|
|||||||
Jamshid Afshar <jafshar@yahoo.com>
|
Jamshid Afshar <jafshar@yahoo.com>
|
||||||
Jan Breig <git@pygos.space>
|
Jan Breig <git@pygos.space>
|
||||||
Jan Chren <dev.rindeal@gmail.com>
|
Jan Chren <dev.rindeal@gmail.com>
|
||||||
Jan Garcia <github-public@n-garcia.com>
|
|
||||||
Jan Götte <jaseg@jaseg.net>
|
Jan Götte <jaseg@jaseg.net>
|
||||||
Jan Keromnes <janx@linux.com>
|
Jan Keromnes <janx@linux.com>
|
||||||
Jan Koprowski <jan.koprowski@gmail.com>
|
Jan Koprowski <jan.koprowski@gmail.com>
|
||||||
@ -1215,7 +1206,6 @@ Kimbro Staken <kstaken@kstaken.com>
|
|||||||
Kir Kolyshkin <kolyshkin@gmail.com>
|
Kir Kolyshkin <kolyshkin@gmail.com>
|
||||||
Kiran Gangadharan <kiran.daredevil@gmail.com>
|
Kiran Gangadharan <kiran.daredevil@gmail.com>
|
||||||
Kirill SIbirev <l0kix2@gmail.com>
|
Kirill SIbirev <l0kix2@gmail.com>
|
||||||
Kirk Easterson <kirk.easterson@gmail.com>
|
|
||||||
knappe <tyler.knappe@gmail.com>
|
knappe <tyler.knappe@gmail.com>
|
||||||
Kohei Tsuruta <coheyxyz@gmail.com>
|
Kohei Tsuruta <coheyxyz@gmail.com>
|
||||||
Koichi Shiraishi <k@zchee.io>
|
Koichi Shiraishi <k@zchee.io>
|
||||||
@ -1250,12 +1240,10 @@ Lars Kellogg-Stedman <lars@redhat.com>
|
|||||||
Lars R. Damerow <lars@pixar.com>
|
Lars R. Damerow <lars@pixar.com>
|
||||||
Lars-Magnus Skog <ralphtheninja@riseup.net>
|
Lars-Magnus Skog <ralphtheninja@riseup.net>
|
||||||
Laszlo Meszaros <lacienator@gmail.com>
|
Laszlo Meszaros <lacienator@gmail.com>
|
||||||
Laura Brehm <laurabrehm@hey.com>
|
|
||||||
Laura Frank <ljfrank@gmail.com>
|
Laura Frank <ljfrank@gmail.com>
|
||||||
Laurent Bernaille <laurent.bernaille@datadoghq.com>
|
Laurent Bernaille <laurent.bernaille@datadoghq.com>
|
||||||
Laurent Erignoux <lerignoux@gmail.com>
|
Laurent Erignoux <lerignoux@gmail.com>
|
||||||
Laurie Voss <github@seldo.com>
|
Laurie Voss <github@seldo.com>
|
||||||
Leandro Motta Barros <lmb@stackedboxes.org>
|
|
||||||
Leandro Siqueira <leandro.siqueira@gmail.com>
|
Leandro Siqueira <leandro.siqueira@gmail.com>
|
||||||
Lee Calcote <leecalcote@gmail.com>
|
Lee Calcote <leecalcote@gmail.com>
|
||||||
Lee Chao <932819864@qq.com>
|
Lee Chao <932819864@qq.com>
|
||||||
@ -1575,7 +1563,6 @@ Nick Neisen <nwneisen@gmail.com>
|
|||||||
Nick Parker <nikaios@gmail.com>
|
Nick Parker <nikaios@gmail.com>
|
||||||
Nick Payne <nick@kurai.co.uk>
|
Nick Payne <nick@kurai.co.uk>
|
||||||
Nick Russo <nicholasjamesrusso@gmail.com>
|
Nick Russo <nicholasjamesrusso@gmail.com>
|
||||||
Nick Santos <nick.santos@docker.com>
|
|
||||||
Nick Stenning <nick.stenning@digital.cabinet-office.gov.uk>
|
Nick Stenning <nick.stenning@digital.cabinet-office.gov.uk>
|
||||||
Nick Stinemates <nick@stinemates.org>
|
Nick Stinemates <nick@stinemates.org>
|
||||||
Nick Wood <nwood@microsoft.com>
|
Nick Wood <nwood@microsoft.com>
|
||||||
@ -1597,7 +1584,6 @@ NikolaMandic <mn080202@gmail.com>
|
|||||||
Nikolas Garofil <nikolas.garofil@uantwerpen.be>
|
Nikolas Garofil <nikolas.garofil@uantwerpen.be>
|
||||||
Nikolay Edigaryev <edigaryev@gmail.com>
|
Nikolay Edigaryev <edigaryev@gmail.com>
|
||||||
Nikolay Milovanov <nmil@itransformers.net>
|
Nikolay Milovanov <nmil@itransformers.net>
|
||||||
ningmingxiao <ning.mingxiao@zte.com.cn>
|
|
||||||
Nirmal Mehta <nirmalkmehta@gmail.com>
|
Nirmal Mehta <nirmalkmehta@gmail.com>
|
||||||
Nishant Totla <nishanttotla@gmail.com>
|
Nishant Totla <nishanttotla@gmail.com>
|
||||||
NIWA Hideyuki <niwa.niwa@nifty.ne.jp>
|
NIWA Hideyuki <niwa.niwa@nifty.ne.jp>
|
||||||
@ -1629,7 +1615,6 @@ Omri Shiv <Omri.Shiv@teradata.com>
|
|||||||
Onur Filiz <onur.filiz@microsoft.com>
|
Onur Filiz <onur.filiz@microsoft.com>
|
||||||
Oriol Francès <oriolfa@gmail.com>
|
Oriol Francès <oriolfa@gmail.com>
|
||||||
Oscar Bonilla <6f6231@gmail.com>
|
Oscar Bonilla <6f6231@gmail.com>
|
||||||
oscar.chen <2972789494@qq.com>
|
|
||||||
Oskar Niburski <oskarniburski@gmail.com>
|
Oskar Niburski <oskarniburski@gmail.com>
|
||||||
Otto Kekäläinen <otto@seravo.fi>
|
Otto Kekäläinen <otto@seravo.fi>
|
||||||
Ouyang Liduo <oyld0210@163.com>
|
Ouyang Liduo <oyld0210@163.com>
|
||||||
@ -1837,7 +1822,6 @@ Rory Hunter <roryhunter2@gmail.com>
|
|||||||
Rory McCune <raesene@gmail.com>
|
Rory McCune <raesene@gmail.com>
|
||||||
Ross Boucher <rboucher@gmail.com>
|
Ross Boucher <rboucher@gmail.com>
|
||||||
Rovanion Luckey <rovanion.luckey@gmail.com>
|
Rovanion Luckey <rovanion.luckey@gmail.com>
|
||||||
Roy Reznik <roy@wiz.io>
|
|
||||||
Royce Remer <royceremer@gmail.com>
|
Royce Remer <royceremer@gmail.com>
|
||||||
Rozhnov Alexandr <nox73@ya.ru>
|
Rozhnov Alexandr <nox73@ya.ru>
|
||||||
Rudolph Gottesheim <r.gottesheim@loot.at>
|
Rudolph Gottesheim <r.gottesheim@loot.at>
|
||||||
@ -2287,7 +2271,6 @@ Xiaoyu Zhang <zhang.xiaoyu33@zte.com.cn>
|
|||||||
xichengliudui <1693291525@qq.com>
|
xichengliudui <1693291525@qq.com>
|
||||||
xiekeyang <xiekeyang@huawei.com>
|
xiekeyang <xiekeyang@huawei.com>
|
||||||
Ximo Guanter Gonzálbez <joaquin.guantergonzalbez@telefonica.com>
|
Ximo Guanter Gonzálbez <joaquin.guantergonzalbez@telefonica.com>
|
||||||
xin.li <xin.li@daocloud.io>
|
|
||||||
Xinbo Weng <xihuanbo_0521@zju.edu.cn>
|
Xinbo Weng <xihuanbo_0521@zju.edu.cn>
|
||||||
Xinfeng Liu <xinfeng.liu@gmail.com>
|
Xinfeng Liu <xinfeng.liu@gmail.com>
|
||||||
Xinzi Zhou <imdreamrunner@gmail.com>
|
Xinzi Zhou <imdreamrunner@gmail.com>
|
||||||
@ -2299,7 +2282,6 @@ Yahya <ya7yaz@gmail.com>
|
|||||||
yalpul <yalpul@gmail.com>
|
yalpul <yalpul@gmail.com>
|
||||||
YAMADA Tsuyoshi <tyamada@minimum2scp.org>
|
YAMADA Tsuyoshi <tyamada@minimum2scp.org>
|
||||||
Yamasaki Masahide <masahide.y@gmail.com>
|
Yamasaki Masahide <masahide.y@gmail.com>
|
||||||
Yamazaki Masashi <masi19bw@gmail.com>
|
|
||||||
Yan Feng <yanfeng2@huawei.com>
|
Yan Feng <yanfeng2@huawei.com>
|
||||||
Yan Zhu <yanzhu@alauda.io>
|
Yan Zhu <yanzhu@alauda.io>
|
||||||
Yang Bai <hamo.by@gmail.com>
|
Yang Bai <hamo.by@gmail.com>
|
||||||
|
9
vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go
generated
vendored
9
vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go
generated
vendored
@ -64,14 +64,13 @@ func stick(f string) error {
|
|||||||
|
|
||||||
// GetDataHome returns XDG_DATA_HOME.
|
// GetDataHome returns XDG_DATA_HOME.
|
||||||
// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set.
|
// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set.
|
||||||
// If HOME and XDG_DATA_HOME are not set, getpwent(3) is consulted to determine the users home directory.
|
|
||||||
//
|
//
|
||||||
// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
|
// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
|
||||||
func GetDataHome() (string, error) {
|
func GetDataHome() (string, error) {
|
||||||
if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" {
|
if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" {
|
||||||
return xdgDataHome, nil
|
return xdgDataHome, nil
|
||||||
}
|
}
|
||||||
home := Get()
|
home := os.Getenv("HOME")
|
||||||
if home == "" {
|
if home == "" {
|
||||||
return "", errors.New("could not get either XDG_DATA_HOME or HOME")
|
return "", errors.New("could not get either XDG_DATA_HOME or HOME")
|
||||||
}
|
}
|
||||||
@ -80,14 +79,13 @@ func GetDataHome() (string, error) {
|
|||||||
|
|
||||||
// GetConfigHome returns XDG_CONFIG_HOME.
|
// GetConfigHome returns XDG_CONFIG_HOME.
|
||||||
// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set.
|
// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set.
|
||||||
// If HOME and XDG_CONFIG_HOME are not set, getpwent(3) is consulted to determine the users home directory.
|
|
||||||
//
|
//
|
||||||
// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
|
// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
|
||||||
func GetConfigHome() (string, error) {
|
func GetConfigHome() (string, error) {
|
||||||
if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" {
|
if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" {
|
||||||
return xdgConfigHome, nil
|
return xdgConfigHome, nil
|
||||||
}
|
}
|
||||||
home := Get()
|
home := os.Getenv("HOME")
|
||||||
if home == "" {
|
if home == "" {
|
||||||
return "", errors.New("could not get either XDG_CONFIG_HOME or HOME")
|
return "", errors.New("could not get either XDG_CONFIG_HOME or HOME")
|
||||||
}
|
}
|
||||||
@ -95,9 +93,8 @@ func GetConfigHome() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetLibHome returns $HOME/.local/lib
|
// GetLibHome returns $HOME/.local/lib
|
||||||
// If HOME is not set, getpwent(3) is consulted to determine the users home directory.
|
|
||||||
func GetLibHome() (string, error) {
|
func GetLibHome() (string, error) {
|
||||||
home := Get()
|
home := os.Getenv("HOME")
|
||||||
if home == "" {
|
if home == "" {
|
||||||
return "", errors.New("could not get HOME")
|
return "", errors.New("could not get HOME")
|
||||||
}
|
}
|
||||||
|
11
vendor/github.com/klauspost/compress/README.md
generated
vendored
11
vendor/github.com/klauspost/compress/README.md
generated
vendored
@ -16,15 +16,6 @@ This package provides various compression algorithms.
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
|
|
||||||
* Apr 5, 2023 - [v1.16.4](https://github.com/klauspost/compress/releases/tag/v1.16.4)
|
|
||||||
* zstd: Improve zstd best efficiency by @greatroar and @klauspost in https://github.com/klauspost/compress/pull/784
|
|
||||||
* zstd: Respect WithAllLitEntropyCompression https://github.com/klauspost/compress/pull/792
|
|
||||||
* zstd: Fix amd64 not always detecting corrupt data https://github.com/klauspost/compress/pull/785
|
|
||||||
* zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795
|
|
||||||
* s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779
|
|
||||||
* s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780
|
|
||||||
* gzhttp: Suppport ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799
|
|
||||||
|
|
||||||
* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
|
* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
|
||||||
* zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776
|
* zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776
|
||||||
* gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767
|
* gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767
|
||||||
@ -624,8 +615,6 @@ Here are other packages of good quality and pure Go (no cgo wrappers or autoconv
|
|||||||
* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression.
|
* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression.
|
||||||
* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression.
|
* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression.
|
||||||
* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer.
|
* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer.
|
||||||
* [github.com/ronanh/intcomp](https://github.com/ronanh/intcomp) - Integer compression.
|
|
||||||
* [github.com/spenczar/fpc](https://github.com/spenczar/fpc) - Float compression.
|
|
||||||
|
|
||||||
# license
|
# license
|
||||||
|
|
||||||
|
9
vendor/github.com/klauspost/compress/zstd/blockenc.go
generated
vendored
9
vendor/github.com/klauspost/compress/zstd/blockenc.go
generated
vendored
@ -473,7 +473,7 @@ func (b *blockEnc) encode(org []byte, raw, rawAllLits bool) error {
|
|||||||
return b.encodeLits(b.literals, rawAllLits)
|
return b.encodeLits(b.literals, rawAllLits)
|
||||||
}
|
}
|
||||||
// We want some difference to at least account for the headers.
|
// We want some difference to at least account for the headers.
|
||||||
saved := b.size - len(b.literals) - (b.size >> 6)
|
saved := b.size - len(b.literals) - (b.size >> 5)
|
||||||
if saved < 16 {
|
if saved < 16 {
|
||||||
if org == nil {
|
if org == nil {
|
||||||
return errIncompressible
|
return errIncompressible
|
||||||
@ -779,13 +779,10 @@ func (b *blockEnc) encode(org []byte, raw, rawAllLits bool) error {
|
|||||||
}
|
}
|
||||||
b.output = wr.out
|
b.output = wr.out
|
||||||
|
|
||||||
// Maybe even add a bigger margin.
|
|
||||||
if len(b.output)-3-bhOffset >= b.size {
|
if len(b.output)-3-bhOffset >= b.size {
|
||||||
// Discard and encode as raw block.
|
// Maybe even add a bigger margin.
|
||||||
b.output = b.encodeRawTo(b.output[:bhOffset], org)
|
|
||||||
b.popOffsets()
|
|
||||||
b.litEnc.Reuse = huff0.ReusePolicyNone
|
b.litEnc.Reuse = huff0.ReusePolicyNone
|
||||||
return nil
|
return errIncompressible
|
||||||
}
|
}
|
||||||
|
|
||||||
// Size is output minus block header.
|
// Size is output minus block header.
|
||||||
|
2
vendor/github.com/klauspost/compress/zstd/bytebuf.go
generated
vendored
2
vendor/github.com/klauspost/compress/zstd/bytebuf.go
generated
vendored
@ -109,7 +109,7 @@ func (r *readerWrapper) readBig(n int, dst []byte) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *readerWrapper) readByte() (byte, error) {
|
func (r *readerWrapper) readByte() (byte, error) {
|
||||||
n2, err := io.ReadFull(r.r, r.tmp[:1])
|
n2, err := r.r.Read(r.tmp[:1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
err = io.ErrUnexpectedEOF
|
err = io.ErrUnexpectedEOF
|
||||||
|
7
vendor/github.com/klauspost/compress/zstd/decoder.go
generated
vendored
7
vendor/github.com/klauspost/compress/zstd/decoder.go
generated
vendored
@ -455,7 +455,12 @@ func (d *Decoder) nextBlock(blocking bool) (ok bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(next.b) > 0 {
|
if len(next.b) > 0 {
|
||||||
d.current.crc.Write(next.b)
|
n, err := d.current.crc.Write(next.b)
|
||||||
|
if err == nil {
|
||||||
|
if n != len(next.b) {
|
||||||
|
d.current.err = io.ErrShortWrite
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if next.err == nil && next.d != nil && next.d.hasCRC {
|
if next.err == nil && next.d != nil && next.d.hasCRC {
|
||||||
got := uint32(d.current.crc.Sum64())
|
got := uint32(d.current.crc.Sum64())
|
||||||
|
227
vendor/github.com/klauspost/compress/zstd/enc_best.go
generated
vendored
227
vendor/github.com/klauspost/compress/zstd/enc_best.go
generated
vendored
@ -34,7 +34,7 @@ type match struct {
|
|||||||
est int32
|
est int32
|
||||||
}
|
}
|
||||||
|
|
||||||
const highScore = maxMatchLen * 8
|
const highScore = 25000
|
||||||
|
|
||||||
// estBits will estimate output bits from predefined tables.
|
// estBits will estimate output bits from predefined tables.
|
||||||
func (m *match) estBits(bitsPerByte int32) {
|
func (m *match) estBits(bitsPerByte int32) {
|
||||||
@ -159,6 +159,7 @@ func (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) {
|
|||||||
|
|
||||||
// nextEmit is where in src the next emitLiteral should start from.
|
// nextEmit is where in src the next emitLiteral should start from.
|
||||||
nextEmit := s
|
nextEmit := s
|
||||||
|
cv := load6432(src, s)
|
||||||
|
|
||||||
// Relative offsets
|
// Relative offsets
|
||||||
offset1 := int32(blk.recentOffsets[0])
|
offset1 := int32(blk.recentOffsets[0])
|
||||||
@ -172,6 +173,7 @@ func (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) {
|
|||||||
blk.literals = append(blk.literals, src[nextEmit:until]...)
|
blk.literals = append(blk.literals, src[nextEmit:until]...)
|
||||||
s.litLen = uint32(until - nextEmit)
|
s.litLen = uint32(until - nextEmit)
|
||||||
}
|
}
|
||||||
|
_ = addLiterals
|
||||||
|
|
||||||
if debugEncoder {
|
if debugEncoder {
|
||||||
println("recent offsets:", blk.recentOffsets)
|
println("recent offsets:", blk.recentOffsets)
|
||||||
@ -186,9 +188,7 @@ encodeLoop:
|
|||||||
panic("offset0 was 0")
|
panic("offset0 was 0")
|
||||||
}
|
}
|
||||||
|
|
||||||
const goodEnough = 250
|
const goodEnough = 100
|
||||||
|
|
||||||
cv := load6432(src, s)
|
|
||||||
|
|
||||||
nextHashL := hashLen(cv, bestLongTableBits, bestLongLen)
|
nextHashL := hashLen(cv, bestLongTableBits, bestLongLen)
|
||||||
nextHashS := hashLen(cv, bestShortTableBits, bestShortLen)
|
nextHashS := hashLen(cv, bestShortTableBits, bestShortLen)
|
||||||
@ -201,45 +201,11 @@ encodeLoop:
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if debugAsserts {
|
if debugAsserts {
|
||||||
if offset <= 0 {
|
|
||||||
panic(offset)
|
|
||||||
}
|
|
||||||
if !bytes.Equal(src[s:s+4], src[offset:offset+4]) {
|
if !bytes.Equal(src[s:s+4], src[offset:offset+4]) {
|
||||||
panic(fmt.Sprintf("first match mismatch: %v != %v, first: %08x", src[s:s+4], src[offset:offset+4], first))
|
panic(fmt.Sprintf("first match mismatch: %v != %v, first: %08x", src[s:s+4], src[offset:offset+4], first))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Try to quick reject if we already have a long match.
|
cand := match{offset: offset, s: s, length: 4 + e.matchlen(s+4, offset+4, src), rep: rep}
|
||||||
if m.length > 16 {
|
|
||||||
left := len(src) - int(m.s+m.length)
|
|
||||||
// If we are too close to the end, keep as is.
|
|
||||||
if left <= 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
checkLen := m.length - (s - m.s) - 8
|
|
||||||
if left > 2 && checkLen > 4 {
|
|
||||||
// Check 4 bytes, 4 bytes from the end of the current match.
|
|
||||||
a := load3232(src, offset+checkLen)
|
|
||||||
b := load3232(src, s+checkLen)
|
|
||||||
if a != b {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
l := 4 + e.matchlen(s+4, offset+4, src)
|
|
||||||
if rep < 0 {
|
|
||||||
// Extend candidate match backwards as far as possible.
|
|
||||||
tMin := s - e.maxMatchOff
|
|
||||||
if tMin < 0 {
|
|
||||||
tMin = 0
|
|
||||||
}
|
|
||||||
for offset > tMin && s > nextEmit && src[offset-1] == src[s-1] && l < maxMatchLength {
|
|
||||||
s--
|
|
||||||
offset--
|
|
||||||
l++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cand := match{offset: offset, s: s, length: l, rep: rep}
|
|
||||||
cand.estBits(bitsPerByte)
|
cand.estBits(bitsPerByte)
|
||||||
if m.est >= highScore || cand.est-m.est+(cand.s-m.s)*bitsPerByte>>10 < 0 {
|
if m.est >= highScore || cand.est-m.est+(cand.s-m.s)*bitsPerByte>>10 < 0 {
|
||||||
*m = cand
|
*m = cand
|
||||||
@ -253,29 +219,17 @@ encodeLoop:
|
|||||||
improve(&best, candidateS.prev-e.cur, s, uint32(cv), -1)
|
improve(&best, candidateS.prev-e.cur, s, uint32(cv), -1)
|
||||||
|
|
||||||
if canRepeat && best.length < goodEnough {
|
if canRepeat && best.length < goodEnough {
|
||||||
if s == nextEmit {
|
cv32 := uint32(cv >> 8)
|
||||||
// Check repeats straight after a match.
|
spp := s + 1
|
||||||
improve(&best, s-offset2, s, uint32(cv), 1|4)
|
improve(&best, spp-offset1, spp, cv32, 1)
|
||||||
improve(&best, s-offset3, s, uint32(cv), 2|4)
|
improve(&best, spp-offset2, spp, cv32, 2)
|
||||||
if offset1 > 1 {
|
improve(&best, spp-offset3, spp, cv32, 3)
|
||||||
improve(&best, s-(offset1-1), s, uint32(cv), 3|4)
|
if best.length > 0 {
|
||||||
}
|
cv32 = uint32(cv >> 24)
|
||||||
}
|
spp += 2
|
||||||
|
|
||||||
// If either no match or a non-repeat match, check at + 1
|
|
||||||
if best.rep <= 0 {
|
|
||||||
cv32 := uint32(cv >> 8)
|
|
||||||
spp := s + 1
|
|
||||||
improve(&best, spp-offset1, spp, cv32, 1)
|
improve(&best, spp-offset1, spp, cv32, 1)
|
||||||
improve(&best, spp-offset2, spp, cv32, 2)
|
improve(&best, spp-offset2, spp, cv32, 2)
|
||||||
improve(&best, spp-offset3, spp, cv32, 3)
|
improve(&best, spp-offset3, spp, cv32, 3)
|
||||||
if best.rep < 0 {
|
|
||||||
cv32 = uint32(cv >> 24)
|
|
||||||
spp += 2
|
|
||||||
improve(&best, spp-offset1, spp, cv32, 1)
|
|
||||||
improve(&best, spp-offset2, spp, cv32, 2)
|
|
||||||
improve(&best, spp-offset3, spp, cv32, 3)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Load next and check...
|
// Load next and check...
|
||||||
@ -290,44 +244,41 @@ encodeLoop:
|
|||||||
if s >= sLimit {
|
if s >= sLimit {
|
||||||
break encodeLoop
|
break encodeLoop
|
||||||
}
|
}
|
||||||
|
cv = load6432(src, s)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s++
|
||||||
candidateS = e.table[hashLen(cv>>8, bestShortTableBits, bestShortLen)]
|
candidateS = e.table[hashLen(cv>>8, bestShortTableBits, bestShortLen)]
|
||||||
cv = load6432(src, s+1)
|
cv = load6432(src, s)
|
||||||
cv2 := load6432(src, s+2)
|
cv2 := load6432(src, s+1)
|
||||||
candidateL = e.longTable[hashLen(cv, bestLongTableBits, bestLongLen)]
|
candidateL = e.longTable[hashLen(cv, bestLongTableBits, bestLongLen)]
|
||||||
candidateL2 := e.longTable[hashLen(cv2, bestLongTableBits, bestLongLen)]
|
candidateL2 := e.longTable[hashLen(cv2, bestLongTableBits, bestLongLen)]
|
||||||
|
|
||||||
// Short at s+1
|
// Short at s+1
|
||||||
improve(&best, candidateS.offset-e.cur, s+1, uint32(cv), -1)
|
improve(&best, candidateS.offset-e.cur, s, uint32(cv), -1)
|
||||||
// Long at s+1, s+2
|
// Long at s+1, s+2
|
||||||
improve(&best, candidateL.offset-e.cur, s+1, uint32(cv), -1)
|
improve(&best, candidateL.offset-e.cur, s, uint32(cv), -1)
|
||||||
improve(&best, candidateL.prev-e.cur, s+1, uint32(cv), -1)
|
improve(&best, candidateL.prev-e.cur, s, uint32(cv), -1)
|
||||||
improve(&best, candidateL2.offset-e.cur, s+2, uint32(cv2), -1)
|
improve(&best, candidateL2.offset-e.cur, s+1, uint32(cv2), -1)
|
||||||
improve(&best, candidateL2.prev-e.cur, s+2, uint32(cv2), -1)
|
improve(&best, candidateL2.prev-e.cur, s+1, uint32(cv2), -1)
|
||||||
if false {
|
if false {
|
||||||
// Short at s+3.
|
// Short at s+3.
|
||||||
// Too often worse...
|
// Too often worse...
|
||||||
improve(&best, e.table[hashLen(cv2>>8, bestShortTableBits, bestShortLen)].offset-e.cur, s+3, uint32(cv2>>8), -1)
|
improve(&best, e.table[hashLen(cv2>>8, bestShortTableBits, bestShortLen)].offset-e.cur, s+2, uint32(cv2>>8), -1)
|
||||||
}
|
}
|
||||||
|
// See if we can find a better match by checking where the current best ends.
|
||||||
// Start check at a fixed offset to allow for a few mismatches.
|
// Use that offset to see if we can find a better full match.
|
||||||
// For this compression level 2 yields the best results.
|
if sAt := best.s + best.length; sAt < sLimit {
|
||||||
// We cannot do this if we have already indexed this position.
|
nextHashL := hashLen(load6432(src, sAt), bestLongTableBits, bestLongLen)
|
||||||
const skipBeginning = 2
|
candidateEnd := e.longTable[nextHashL]
|
||||||
if best.s > s-skipBeginning {
|
// Start check at a fixed offset to allow for a few mismatches.
|
||||||
// See if we can find a better match by checking where the current best ends.
|
// For this compression level 2 yields the best results.
|
||||||
// Use that offset to see if we can find a better full match.
|
const skipBeginning = 2
|
||||||
if sAt := best.s + best.length; sAt < sLimit {
|
if pos := candidateEnd.offset - e.cur - best.length + skipBeginning; pos >= 0 {
|
||||||
nextHashL := hashLen(load6432(src, sAt), bestLongTableBits, bestLongLen)
|
improve(&best, pos, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)
|
||||||
candidateEnd := e.longTable[nextHashL]
|
if pos := candidateEnd.prev - e.cur - best.length + skipBeginning; pos >= 0 {
|
||||||
|
improve(&best, pos, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)
|
||||||
if off := candidateEnd.offset - e.cur - best.length + skipBeginning; off >= 0 {
|
|
||||||
improve(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)
|
|
||||||
if off := candidateEnd.prev - e.cur - best.length + skipBeginning; off >= 0 {
|
|
||||||
improve(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,34 +292,51 @@ encodeLoop:
|
|||||||
|
|
||||||
// We have a match, we can store the forward value
|
// We have a match, we can store the forward value
|
||||||
if best.rep > 0 {
|
if best.rep > 0 {
|
||||||
|
s = best.s
|
||||||
var seq seq
|
var seq seq
|
||||||
seq.matchLen = uint32(best.length - zstdMinMatch)
|
seq.matchLen = uint32(best.length - zstdMinMatch)
|
||||||
if debugAsserts && s <= nextEmit {
|
|
||||||
panic("s <= nextEmit")
|
|
||||||
}
|
|
||||||
addLiterals(&seq, best.s)
|
|
||||||
|
|
||||||
// Repeat. If bit 4 is set, this is a non-lit repeat.
|
// We might be able to match backwards.
|
||||||
seq.offset = uint32(best.rep & 3)
|
// Extend as long as we can.
|
||||||
|
start := best.s
|
||||||
|
// We end the search early, so we don't risk 0 literals
|
||||||
|
// and have to do special offset treatment.
|
||||||
|
startLimit := nextEmit + 1
|
||||||
|
|
||||||
|
tMin := s - e.maxMatchOff
|
||||||
|
if tMin < 0 {
|
||||||
|
tMin = 0
|
||||||
|
}
|
||||||
|
repIndex := best.offset
|
||||||
|
for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 {
|
||||||
|
repIndex--
|
||||||
|
start--
|
||||||
|
seq.matchLen++
|
||||||
|
}
|
||||||
|
addLiterals(&seq, start)
|
||||||
|
|
||||||
|
// rep 0
|
||||||
|
seq.offset = uint32(best.rep)
|
||||||
if debugSequences {
|
if debugSequences {
|
||||||
println("repeat sequence", seq, "next s:", s)
|
println("repeat sequence", seq, "next s:", s)
|
||||||
}
|
}
|
||||||
blk.sequences = append(blk.sequences, seq)
|
blk.sequences = append(blk.sequences, seq)
|
||||||
|
|
||||||
// Index old s + 1 -> s - 1
|
// Index match start+1 (long) -> s - 1
|
||||||
index0 := s + 1
|
index0 := s
|
||||||
s = best.s + best.length
|
s = best.s + best.length
|
||||||
|
|
||||||
nextEmit = s
|
nextEmit = s
|
||||||
if s >= sLimit {
|
if s >= sLimit {
|
||||||
if debugEncoder {
|
if debugEncoder {
|
||||||
println("repeat ended", s, best.length)
|
println("repeat ended", s, best.length)
|
||||||
|
|
||||||
}
|
}
|
||||||
break encodeLoop
|
break encodeLoop
|
||||||
}
|
}
|
||||||
// Index skipped...
|
// Index skipped...
|
||||||
off := index0 + e.cur
|
off := index0 + e.cur
|
||||||
for index0 < s {
|
for index0 < s-1 {
|
||||||
cv0 := load6432(src, index0)
|
cv0 := load6432(src, index0)
|
||||||
h0 := hashLen(cv0, bestLongTableBits, bestLongLen)
|
h0 := hashLen(cv0, bestLongTableBits, bestLongLen)
|
||||||
h1 := hashLen(cv0, bestShortTableBits, bestShortLen)
|
h1 := hashLen(cv0, bestShortTableBits, bestShortLen)
|
||||||
@ -378,19 +346,17 @@ encodeLoop:
|
|||||||
index0++
|
index0++
|
||||||
}
|
}
|
||||||
switch best.rep {
|
switch best.rep {
|
||||||
case 2, 4 | 1:
|
case 2:
|
||||||
offset1, offset2 = offset2, offset1
|
offset1, offset2 = offset2, offset1
|
||||||
case 3, 4 | 2:
|
case 3:
|
||||||
offset1, offset2, offset3 = offset3, offset1, offset2
|
offset1, offset2, offset3 = offset3, offset1, offset2
|
||||||
case 4 | 3:
|
|
||||||
offset1, offset2, offset3 = offset1-1, offset1, offset2
|
|
||||||
}
|
}
|
||||||
|
cv = load6432(src, s)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// A 4-byte match has been found. Update recent offsets.
|
// A 4-byte match has been found. Update recent offsets.
|
||||||
// We'll later see if more than 4 bytes.
|
// We'll later see if more than 4 bytes.
|
||||||
index0 := s + 1
|
|
||||||
s = best.s
|
s = best.s
|
||||||
t := best.offset
|
t := best.offset
|
||||||
offset1, offset2, offset3 = s-t, offset1, offset2
|
offset1, offset2, offset3 = s-t, offset1, offset2
|
||||||
@ -403,9 +369,22 @@ encodeLoop:
|
|||||||
panic("invalid offset")
|
panic("invalid offset")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extend the n-byte match as long as possible.
|
||||||
|
l := best.length
|
||||||
|
|
||||||
|
// Extend backwards
|
||||||
|
tMin := s - e.maxMatchOff
|
||||||
|
if tMin < 0 {
|
||||||
|
tMin = 0
|
||||||
|
}
|
||||||
|
for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength {
|
||||||
|
s--
|
||||||
|
t--
|
||||||
|
l++
|
||||||
|
}
|
||||||
|
|
||||||
// Write our sequence
|
// Write our sequence
|
||||||
var seq seq
|
var seq seq
|
||||||
l := best.length
|
|
||||||
seq.litLen = uint32(s - nextEmit)
|
seq.litLen = uint32(s - nextEmit)
|
||||||
seq.matchLen = uint32(l - zstdMinMatch)
|
seq.matchLen = uint32(l - zstdMinMatch)
|
||||||
if seq.litLen > 0 {
|
if seq.litLen > 0 {
|
||||||
@ -422,8 +401,10 @@ encodeLoop:
|
|||||||
break encodeLoop
|
break encodeLoop
|
||||||
}
|
}
|
||||||
|
|
||||||
// Index old s + 1 -> s - 1
|
// Index match start+1 (long) -> s - 1
|
||||||
for index0 < s {
|
index0 := s - l + 1
|
||||||
|
// every entry
|
||||||
|
for index0 < s-1 {
|
||||||
cv0 := load6432(src, index0)
|
cv0 := load6432(src, index0)
|
||||||
h0 := hashLen(cv0, bestLongTableBits, bestLongLen)
|
h0 := hashLen(cv0, bestLongTableBits, bestLongLen)
|
||||||
h1 := hashLen(cv0, bestShortTableBits, bestShortLen)
|
h1 := hashLen(cv0, bestShortTableBits, bestShortLen)
|
||||||
@ -432,6 +413,50 @@ encodeLoop:
|
|||||||
e.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset}
|
e.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset}
|
||||||
index0++
|
index0++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cv = load6432(src, s)
|
||||||
|
if !canRepeat {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check offset 2
|
||||||
|
for {
|
||||||
|
o2 := s - offset2
|
||||||
|
if load3232(src, o2) != uint32(cv) {
|
||||||
|
// Do regular search
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store this, since we have it.
|
||||||
|
nextHashS := hashLen(cv, bestShortTableBits, bestShortLen)
|
||||||
|
nextHashL := hashLen(cv, bestLongTableBits, bestLongLen)
|
||||||
|
|
||||||
|
// We have at least 4 byte match.
|
||||||
|
// No need to check backwards. We come straight from a match
|
||||||
|
l := 4 + e.matchlen(s+4, o2+4, src)
|
||||||
|
|
||||||
|
e.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: e.longTable[nextHashL].offset}
|
||||||
|
e.table[nextHashS] = prevEntry{offset: s + e.cur, prev: e.table[nextHashS].offset}
|
||||||
|
seq.matchLen = uint32(l) - zstdMinMatch
|
||||||
|
seq.litLen = 0
|
||||||
|
|
||||||
|
// Since litlen is always 0, this is offset 1.
|
||||||
|
seq.offset = 1
|
||||||
|
s += l
|
||||||
|
nextEmit = s
|
||||||
|
if debugSequences {
|
||||||
|
println("sequence", seq, "next s:", s)
|
||||||
|
}
|
||||||
|
blk.sequences = append(blk.sequences, seq)
|
||||||
|
|
||||||
|
// Swap offset 1 and 2.
|
||||||
|
offset1, offset2 = offset2, offset1
|
||||||
|
if s >= sLimit {
|
||||||
|
// Finished
|
||||||
|
break encodeLoop
|
||||||
|
}
|
||||||
|
cv = load6432(src, s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if int(nextEmit) < len(src) {
|
if int(nextEmit) < len(src) {
|
||||||
|
78
vendor/github.com/klauspost/compress/zstd/encoder.go
generated
vendored
78
vendor/github.com/klauspost/compress/zstd/encoder.go
generated
vendored
@ -277,9 +277,23 @@ func (e *Encoder) nextBlock(final bool) error {
|
|||||||
s.eofWritten = true
|
s.eofWritten = true
|
||||||
}
|
}
|
||||||
|
|
||||||
s.err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
err := errIncompressible
|
||||||
if s.err != nil {
|
// If we got the exact same number of literals as input,
|
||||||
return s.err
|
// assume the literals cannot be compressed.
|
||||||
|
if len(src) != len(blk.literals) || len(src) != e.o.blockSize {
|
||||||
|
err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
||||||
|
}
|
||||||
|
switch err {
|
||||||
|
case errIncompressible:
|
||||||
|
if debugEncoder {
|
||||||
|
println("Storing incompressible block as raw")
|
||||||
|
}
|
||||||
|
blk.encodeRaw(src)
|
||||||
|
// In fast mode, we do not transfer offsets, so we don't have to deal with changing the.
|
||||||
|
case nil:
|
||||||
|
default:
|
||||||
|
s.err = err
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
_, s.err = s.w.Write(blk.output)
|
_, s.err = s.w.Write(blk.output)
|
||||||
s.nWritten += int64(len(blk.output))
|
s.nWritten += int64(len(blk.output))
|
||||||
@ -329,8 +343,22 @@ func (e *Encoder) nextBlock(final bool) error {
|
|||||||
}
|
}
|
||||||
s.wWg.Done()
|
s.wWg.Done()
|
||||||
}()
|
}()
|
||||||
s.writeErr = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
err := errIncompressible
|
||||||
if s.writeErr != nil {
|
// If we got the exact same number of literals as input,
|
||||||
|
// assume the literals cannot be compressed.
|
||||||
|
if len(src) != len(blk.literals) || len(src) != e.o.blockSize {
|
||||||
|
err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
||||||
|
}
|
||||||
|
switch err {
|
||||||
|
case errIncompressible:
|
||||||
|
if debugEncoder {
|
||||||
|
println("Storing incompressible block as raw")
|
||||||
|
}
|
||||||
|
blk.encodeRaw(src)
|
||||||
|
// In fast mode, we do not transfer offsets, so we don't have to deal with changing the.
|
||||||
|
case nil:
|
||||||
|
default:
|
||||||
|
s.writeErr = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, s.writeErr = s.w.Write(blk.output)
|
_, s.writeErr = s.w.Write(blk.output)
|
||||||
@ -540,15 +568,25 @@ func (e *Encoder) EncodeAll(src, dst []byte) []byte {
|
|||||||
|
|
||||||
// If we got the exact same number of literals as input,
|
// If we got the exact same number of literals as input,
|
||||||
// assume the literals cannot be compressed.
|
// assume the literals cannot be compressed.
|
||||||
|
err := errIncompressible
|
||||||
oldout := blk.output
|
oldout := blk.output
|
||||||
// Output directly to dst
|
if len(blk.literals) != len(src) || len(src) != e.o.blockSize {
|
||||||
blk.output = dst
|
// Output directly to dst
|
||||||
|
blk.output = dst
|
||||||
|
err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
||||||
|
}
|
||||||
|
|
||||||
err := blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy)
|
switch err {
|
||||||
if err != nil {
|
case errIncompressible:
|
||||||
|
if debugEncoder {
|
||||||
|
println("Storing incompressible block as raw")
|
||||||
|
}
|
||||||
|
dst = blk.encodeRawTo(dst, src)
|
||||||
|
case nil:
|
||||||
|
dst = blk.output
|
||||||
|
default:
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
dst = blk.output
|
|
||||||
blk.output = oldout
|
blk.output = oldout
|
||||||
} else {
|
} else {
|
||||||
enc.Reset(e.o.dict, false)
|
enc.Reset(e.o.dict, false)
|
||||||
@ -567,11 +605,25 @@ func (e *Encoder) EncodeAll(src, dst []byte) []byte {
|
|||||||
if len(src) == 0 {
|
if len(src) == 0 {
|
||||||
blk.last = true
|
blk.last = true
|
||||||
}
|
}
|
||||||
err := blk.encode(todo, e.o.noEntropy, !e.o.allLitEntropy)
|
err := errIncompressible
|
||||||
if err != nil {
|
// If we got the exact same number of literals as input,
|
||||||
|
// assume the literals cannot be compressed.
|
||||||
|
if len(blk.literals) != len(todo) || len(todo) != e.o.blockSize {
|
||||||
|
err = blk.encode(todo, e.o.noEntropy, !e.o.allLitEntropy)
|
||||||
|
}
|
||||||
|
|
||||||
|
switch err {
|
||||||
|
case errIncompressible:
|
||||||
|
if debugEncoder {
|
||||||
|
println("Storing incompressible block as raw")
|
||||||
|
}
|
||||||
|
dst = blk.encodeRawTo(dst, todo)
|
||||||
|
blk.popOffsets()
|
||||||
|
case nil:
|
||||||
|
dst = append(dst, blk.output...)
|
||||||
|
default:
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
dst = append(dst, blk.output...)
|
|
||||||
blk.reset(nil)
|
blk.reset(nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
vendor/github.com/klauspost/compress/zstd/encoder_options.go
generated
vendored
4
vendor/github.com/klauspost/compress/zstd/encoder_options.go
generated
vendored
@ -39,7 +39,7 @@ func (o *encoderOptions) setDefault() {
|
|||||||
blockSize: maxCompressedBlockSize,
|
blockSize: maxCompressedBlockSize,
|
||||||
windowSize: 8 << 20,
|
windowSize: 8 << 20,
|
||||||
level: SpeedDefault,
|
level: SpeedDefault,
|
||||||
allLitEntropy: false,
|
allLitEntropy: true,
|
||||||
lowMem: false,
|
lowMem: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ func WithEncoderLevel(l EncoderLevel) EOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !o.customALEntropy {
|
if !o.customALEntropy {
|
||||||
o.allLitEntropy = l > SpeedDefault
|
o.allLitEntropy = l > SpeedFastest
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
35
vendor/github.com/klauspost/compress/zstd/framedec.go
generated
vendored
35
vendor/github.com/klauspost/compress/zstd/framedec.go
generated
vendored
@ -293,9 +293,13 @@ func (d *frameDec) next(block *blockDec) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkCRC will check the checksum, assuming the frame has one.
|
// checkCRC will check the checksum if the frame has one.
|
||||||
// Will return ErrCRCMismatch if crc check failed, otherwise nil.
|
// Will return ErrCRCMismatch if crc check failed, otherwise nil.
|
||||||
func (d *frameDec) checkCRC() error {
|
func (d *frameDec) checkCRC() error {
|
||||||
|
if !d.HasCheckSum {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// We can overwrite upper tmp now
|
// We can overwrite upper tmp now
|
||||||
buf, err := d.rawInput.readSmall(4)
|
buf, err := d.rawInput.readSmall(4)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -303,6 +307,10 @@ func (d *frameDec) checkCRC() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if d.o.ignoreChecksum {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
want := binary.LittleEndian.Uint32(buf[:4])
|
want := binary.LittleEndian.Uint32(buf[:4])
|
||||||
got := uint32(d.crc.Sum64())
|
got := uint32(d.crc.Sum64())
|
||||||
|
|
||||||
@ -318,13 +326,17 @@ func (d *frameDec) checkCRC() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// consumeCRC skips over the checksum, assuming the frame has one.
|
// consumeCRC reads the checksum data if the frame has one.
|
||||||
func (d *frameDec) consumeCRC() error {
|
func (d *frameDec) consumeCRC() error {
|
||||||
_, err := d.rawInput.readSmall(4)
|
if d.HasCheckSum {
|
||||||
if err != nil {
|
_, err := d.rawInput.readSmall(4)
|
||||||
println("CRC missing?", err)
|
if err != nil {
|
||||||
|
println("CRC missing?", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// runDecoder will run the decoder for the remainder of the frame.
|
// runDecoder will run the decoder for the remainder of the frame.
|
||||||
@ -403,8 +415,15 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {
|
|||||||
if d.o.ignoreChecksum {
|
if d.o.ignoreChecksum {
|
||||||
err = d.consumeCRC()
|
err = d.consumeCRC()
|
||||||
} else {
|
} else {
|
||||||
d.crc.Write(dst[crcStart:])
|
var n int
|
||||||
err = d.checkCRC()
|
n, err = d.crc.Write(dst[crcStart:])
|
||||||
|
if err == nil {
|
||||||
|
if n != len(dst)-crcStart {
|
||||||
|
err = io.ErrShortWrite
|
||||||
|
} else {
|
||||||
|
err = d.checkCRC()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
vendor/github.com/klauspost/compress/zstd/seqdec.go
generated
vendored
5
vendor/github.com/klauspost/compress/zstd/seqdec.go
generated
vendored
@ -236,12 +236,9 @@ func (s *sequenceDecs) decodeSync(hist []byte) error {
|
|||||||
maxBlockSize = s.windowSize
|
maxBlockSize = s.windowSize
|
||||||
}
|
}
|
||||||
|
|
||||||
if debugDecoder {
|
|
||||||
println("decodeSync: decoding", seqs, "sequences", br.remain(), "bits remain on stream")
|
|
||||||
}
|
|
||||||
for i := seqs - 1; i >= 0; i-- {
|
for i := seqs - 1; i >= 0; i-- {
|
||||||
if br.overread() {
|
if br.overread() {
|
||||||
printf("reading sequence %d, exceeded available data. Overread by %d\n", seqs-i, -br.remain())
|
printf("reading sequence %d, exceeded available data\n", seqs-i)
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
var ll, mo, ml int
|
var ll, mo, ml int
|
||||||
|
16
vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
generated
vendored
16
vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
generated
vendored
@ -5,7 +5,6 @@ package zstd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
|
|
||||||
"github.com/klauspost/compress/internal/cpuinfo"
|
"github.com/klauspost/compress/internal/cpuinfo"
|
||||||
)
|
)
|
||||||
@ -135,9 +134,6 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
|
|||||||
return true, fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available",
|
return true, fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available",
|
||||||
ctx.ll, ctx.litRemain+ctx.ll)
|
ctx.ll, ctx.litRemain+ctx.ll)
|
||||||
|
|
||||||
case errorOverread:
|
|
||||||
return true, io.ErrUnexpectedEOF
|
|
||||||
|
|
||||||
case errorNotEnoughSpace:
|
case errorNotEnoughSpace:
|
||||||
size := ctx.outPosition + ctx.ll + ctx.ml
|
size := ctx.outPosition + ctx.ll + ctx.ml
|
||||||
if debugDecoder {
|
if debugDecoder {
|
||||||
@ -206,9 +202,6 @@ const errorNotEnoughLiterals = 4
|
|||||||
// error reported when capacity of `out` is too small
|
// error reported when capacity of `out` is too small
|
||||||
const errorNotEnoughSpace = 5
|
const errorNotEnoughSpace = 5
|
||||||
|
|
||||||
// error reported when bits are overread.
|
|
||||||
const errorOverread = 6
|
|
||||||
|
|
||||||
// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm.
|
// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm.
|
||||||
//
|
//
|
||||||
// Please refer to seqdec_generic.go for the reference implementation.
|
// Please refer to seqdec_generic.go for the reference implementation.
|
||||||
@ -254,10 +247,6 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
|||||||
litRemain: len(s.literals),
|
litRemain: len(s.literals),
|
||||||
}
|
}
|
||||||
|
|
||||||
if debugDecoder {
|
|
||||||
println("decode: decoding", len(seqs), "sequences", br.remain(), "bits remain on stream")
|
|
||||||
}
|
|
||||||
|
|
||||||
s.seqSize = 0
|
s.seqSize = 0
|
||||||
lte56bits := s.maxBits+s.offsets.fse.actualTableLog+s.matchLengths.fse.actualTableLog+s.litLengths.fse.actualTableLog <= 56
|
lte56bits := s.maxBits+s.offsets.fse.actualTableLog+s.matchLengths.fse.actualTableLog+s.litLengths.fse.actualTableLog <= 56
|
||||||
var errCode int
|
var errCode int
|
||||||
@ -288,8 +277,6 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
|||||||
case errorNotEnoughLiterals:
|
case errorNotEnoughLiterals:
|
||||||
ll := ctx.seqs[i].ll
|
ll := ctx.seqs[i].ll
|
||||||
return fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", ll, ctx.litRemain+ll)
|
return fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", ll, ctx.litRemain+ll)
|
||||||
case errorOverread:
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("sequenceDecs_decode_amd64 returned erronous code %d", errCode)
|
return fmt.Errorf("sequenceDecs_decode_amd64 returned erronous code %d", errCode)
|
||||||
@ -304,9 +291,6 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
|||||||
if s.seqSize > maxBlockSize {
|
if s.seqSize > maxBlockSize {
|
||||||
return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
|
return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
|
||||||
}
|
}
|
||||||
if debugDecoder {
|
|
||||||
println("decode: ", br.remain(), "bits remain on stream. code:", errCode)
|
|
||||||
}
|
|
||||||
err := br.close()
|
err := br.close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
printf("Closing sequences: %v, %+v\n", err, *br)
|
printf("Closing sequences: %v, %+v\n", err, *br)
|
||||||
|
124
vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
generated
vendored
124
vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
generated
vendored
@ -38,7 +38,7 @@ sequenceDecs_decode_amd64_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_byte_by_byte:
|
sequenceDecs_decode_amd64_fill_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decode_amd64_fill_check_overread
|
JLE sequenceDecs_decode_amd64_fill_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decode_amd64_fill_end
|
JLE sequenceDecs_decode_amd64_fill_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -49,10 +49,6 @@ sequenceDecs_decode_amd64_fill_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decode_amd64_fill_byte_by_byte
|
JMP sequenceDecs_decode_amd64_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_end:
|
sequenceDecs_decode_amd64_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ R9, AX
|
MOVQ R9, AX
|
||||||
@ -109,7 +105,7 @@ sequenceDecs_decode_amd64_ml_update_zero:
|
|||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decode_amd64_fill_2_check_overread
|
JLE sequenceDecs_decode_amd64_fill_2_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decode_amd64_fill_2_end
|
JLE sequenceDecs_decode_amd64_fill_2_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -120,10 +116,6 @@ sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decode_amd64_fill_2_byte_by_byte
|
JMP sequenceDecs_decode_amd64_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_2_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_amd64_fill_2_end:
|
sequenceDecs_decode_amd64_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ DI, AX
|
MOVQ DI, AX
|
||||||
@ -328,11 +320,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
||||||
// Requires: CMOV
|
// Requires: CMOV
|
||||||
TEXT ·sequenceDecs_decode_56_amd64(SB), $8-32
|
TEXT ·sequenceDecs_decode_56_amd64(SB), $8-32
|
||||||
@ -369,7 +356,7 @@ sequenceDecs_decode_56_amd64_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decode_56_amd64_fill_check_overread
|
JLE sequenceDecs_decode_56_amd64_fill_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decode_56_amd64_fill_end
|
JLE sequenceDecs_decode_56_amd64_fill_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -380,10 +367,6 @@ sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decode_56_amd64_fill_byte_by_byte
|
JMP sequenceDecs_decode_56_amd64_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_56_amd64_fill_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_56_amd64_fill_end:
|
sequenceDecs_decode_56_amd64_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ R9, AX
|
MOVQ R9, AX
|
||||||
@ -630,11 +613,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
||||||
// Requires: BMI, BMI2, CMOV
|
// Requires: BMI, BMI2, CMOV
|
||||||
TEXT ·sequenceDecs_decode_bmi2(SB), $8-32
|
TEXT ·sequenceDecs_decode_bmi2(SB), $8-32
|
||||||
@ -671,7 +649,7 @@ sequenceDecs_decode_bmi2_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decode_bmi2_fill_check_overread
|
JLE sequenceDecs_decode_bmi2_fill_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decode_bmi2_fill_end
|
JLE sequenceDecs_decode_bmi2_fill_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -682,10 +660,6 @@ sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decode_bmi2_fill_byte_by_byte
|
JMP sequenceDecs_decode_bmi2_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_end:
|
sequenceDecs_decode_bmi2_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -726,7 +700,7 @@ sequenceDecs_decode_bmi2_fill_end:
|
|||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decode_bmi2_fill_2_check_overread
|
JLE sequenceDecs_decode_bmi2_fill_2_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decode_bmi2_fill_2_end
|
JLE sequenceDecs_decode_bmi2_fill_2_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -737,10 +711,6 @@ sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decode_bmi2_fill_2_byte_by_byte
|
JMP sequenceDecs_decode_bmi2_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_2_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_bmi2_fill_2_end:
|
sequenceDecs_decode_bmi2_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -919,11 +889,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
||||||
// Requires: BMI, BMI2, CMOV
|
// Requires: BMI, BMI2, CMOV
|
||||||
TEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32
|
TEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32
|
||||||
@ -960,7 +925,7 @@ sequenceDecs_decode_56_bmi2_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decode_56_bmi2_fill_check_overread
|
JLE sequenceDecs_decode_56_bmi2_fill_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decode_56_bmi2_fill_end
|
JLE sequenceDecs_decode_56_bmi2_fill_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -971,10 +936,6 @@ sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decode_56_bmi2_fill_byte_by_byte
|
JMP sequenceDecs_decode_56_bmi2_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decode_56_bmi2_fill_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decode_56_bmi2_fill_end:
|
sequenceDecs_decode_56_bmi2_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -1179,11 +1140,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool
|
// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool
|
||||||
// Requires: SSE
|
// Requires: SSE
|
||||||
TEXT ·sequenceDecs_executeSimple_amd64(SB), $8-9
|
TEXT ·sequenceDecs_executeSimple_amd64(SB), $8-9
|
||||||
@ -1848,7 +1804,7 @@ sequenceDecs_decodeSync_amd64_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decodeSync_amd64_fill_check_overread
|
JLE sequenceDecs_decodeSync_amd64_fill_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_amd64_fill_end
|
JLE sequenceDecs_decodeSync_amd64_fill_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -1859,10 +1815,6 @@ sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decodeSync_amd64_fill_byte_by_byte
|
JMP sequenceDecs_decodeSync_amd64_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_end:
|
sequenceDecs_decodeSync_amd64_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ R9, AX
|
MOVQ R9, AX
|
||||||
@ -1919,7 +1871,7 @@ sequenceDecs_decodeSync_amd64_ml_update_zero:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decodeSync_amd64_fill_2_check_overread
|
JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -1930,10 +1882,6 @@ sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte
|
JMP sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_2_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_amd64_fill_2_end:
|
sequenceDecs_decodeSync_amd64_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ DI, AX
|
MOVQ DI, AX
|
||||||
@ -2343,11 +2291,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// Return with not enough output space error
|
// Return with not enough output space error
|
||||||
error_not_enough_space:
|
error_not_enough_space:
|
||||||
MOVQ ctx+16(FP), AX
|
MOVQ ctx+16(FP), AX
|
||||||
@ -2413,7 +2356,7 @@ sequenceDecs_decodeSync_bmi2_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decodeSync_bmi2_fill_check_overread
|
JLE sequenceDecs_decodeSync_bmi2_fill_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_bmi2_fill_end
|
JLE sequenceDecs_decodeSync_bmi2_fill_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -2424,10 +2367,6 @@ sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decodeSync_bmi2_fill_byte_by_byte
|
JMP sequenceDecs_decodeSync_bmi2_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_end:
|
sequenceDecs_decodeSync_bmi2_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -2468,7 +2407,7 @@ sequenceDecs_decodeSync_bmi2_fill_end:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decodeSync_bmi2_fill_2_check_overread
|
JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -2479,10 +2418,6 @@ sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte
|
JMP sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_2_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_bmi2_fill_2_end:
|
sequenceDecs_decodeSync_bmi2_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -2866,11 +2801,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// Return with not enough output space error
|
// Return with not enough output space error
|
||||||
error_not_enough_space:
|
error_not_enough_space:
|
||||||
MOVQ ctx+16(FP), AX
|
MOVQ ctx+16(FP), AX
|
||||||
@ -2936,7 +2866,7 @@ sequenceDecs_decodeSync_safe_amd64_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decodeSync_safe_amd64_fill_check_overread
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -2947,10 +2877,6 @@ sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_end:
|
sequenceDecs_decodeSync_safe_amd64_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ R9, AX
|
MOVQ R9, AX
|
||||||
@ -3007,7 +2933,7 @@ sequenceDecs_decodeSync_safe_amd64_ml_update_zero:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
||||||
CMPQ SI, $0x00
|
CMPQ SI, $0x00
|
||||||
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
||||||
CMPQ BX, $0x07
|
CMPQ BX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
||||||
SHLQ $0x08, DX
|
SHLQ $0x08, DX
|
||||||
@ -3018,10 +2944,6 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
|||||||
ORQ AX, DX
|
ORQ AX, DX
|
||||||
JMP sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread:
|
|
||||||
CMPQ BX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_amd64_fill_2_end:
|
sequenceDecs_decodeSync_safe_amd64_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ DI, AX
|
MOVQ DI, AX
|
||||||
@ -3533,11 +3455,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// Return with not enough output space error
|
// Return with not enough output space error
|
||||||
error_not_enough_space:
|
error_not_enough_space:
|
||||||
MOVQ ctx+16(FP), AX
|
MOVQ ctx+16(FP), AX
|
||||||
@ -3603,7 +3520,7 @@ sequenceDecs_decodeSync_safe_bmi2_main_loop:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decodeSync_safe_bmi2_fill_check_overread
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -3614,10 +3531,6 @@ sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
||||||
// Update offset
|
// Update offset
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -3658,7 +3571,7 @@ sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
|||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
||||||
CMPQ BX, $0x00
|
CMPQ BX, $0x00
|
||||||
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
||||||
CMPQ DX, $0x07
|
CMPQ DX, $0x07
|
||||||
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
||||||
SHLQ $0x08, AX
|
SHLQ $0x08, AX
|
||||||
@ -3669,10 +3582,6 @@ sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
|||||||
ORQ CX, AX
|
ORQ CX, AX
|
||||||
JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread:
|
|
||||||
CMPQ DX, $0x40
|
|
||||||
JA error_overread
|
|
||||||
|
|
||||||
sequenceDecs_decodeSync_safe_bmi2_fill_2_end:
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_end:
|
||||||
// Update literal length
|
// Update literal length
|
||||||
MOVQ $0x00000808, CX
|
MOVQ $0x00000808, CX
|
||||||
@ -4158,11 +4067,6 @@ error_not_enough_literals:
|
|||||||
MOVQ $0x00000004, ret+24(FP)
|
MOVQ $0x00000004, ret+24(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// Return with overread error
|
|
||||||
error_overread:
|
|
||||||
MOVQ $0x00000006, ret+24(FP)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// Return with not enough output space error
|
// Return with not enough output space error
|
||||||
error_not_enough_space:
|
error_not_enough_space:
|
||||||
MOVQ ctx+16(FP), AX
|
MOVQ ctx+16(FP), AX
|
||||||
|
4
vendor/github.com/klauspost/compress/zstd/zstd.go
generated
vendored
4
vendor/github.com/klauspost/compress/zstd/zstd.go
generated
vendored
@ -128,11 +128,11 @@ func matchLen(a, b []byte) (n int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func load3232(b []byte, i int32) uint32 {
|
func load3232(b []byte, i int32) uint32 {
|
||||||
return binary.LittleEndian.Uint32(b[:len(b):len(b)][i:])
|
return binary.LittleEndian.Uint32(b[i:])
|
||||||
}
|
}
|
||||||
|
|
||||||
func load6432(b []byte, i int32) uint64 {
|
func load6432(b []byte, i int32) uint64 {
|
||||||
return binary.LittleEndian.Uint64(b[:len(b):len(b)][i:])
|
return binary.LittleEndian.Uint64(b[i:])
|
||||||
}
|
}
|
||||||
|
|
||||||
type byter interface {
|
type byter interface {
|
||||||
|
3
vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
generated
vendored
3
vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
generated
vendored
@ -65,4 +65,7 @@ const (
|
|||||||
|
|
||||||
// AnnotationArtifactDescription is the annotation key for the human readable description for the artifact.
|
// AnnotationArtifactDescription is the annotation key for the human readable description for the artifact.
|
||||||
AnnotationArtifactDescription = "org.opencontainers.artifact.description"
|
AnnotationArtifactDescription = "org.opencontainers.artifact.description"
|
||||||
|
|
||||||
|
// AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing.
|
||||||
|
AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied"
|
||||||
)
|
)
|
||||||
|
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
generated
vendored
Normal file
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright 2022 The Linux Foundation
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
// Artifact describes an artifact manifest.
|
||||||
|
// This structure provides `application/vnd.oci.artifact.manifest.v1+json` mediatype when marshalled to JSON.
|
||||||
|
type Artifact struct {
|
||||||
|
// MediaType is the media type of the object this schema refers to.
|
||||||
|
MediaType string `json:"mediaType"`
|
||||||
|
|
||||||
|
// ArtifactType is the IANA media type of the artifact this schema refers to.
|
||||||
|
ArtifactType string `json:"artifactType"`
|
||||||
|
|
||||||
|
// Blobs is a collection of blobs referenced by this manifest.
|
||||||
|
Blobs []Descriptor `json:"blobs,omitempty"`
|
||||||
|
|
||||||
|
// Subject (reference) is an optional link from the artifact to another manifest forming an association between the artifact and the other manifest.
|
||||||
|
Subject *Descriptor `json:"subject,omitempty"`
|
||||||
|
|
||||||
|
// Annotations contains arbitrary metadata for the artifact manifest.
|
||||||
|
Annotations map[string]string `json:"annotations,omitempty"`
|
||||||
|
}
|
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go
generated
vendored
34
vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go
generated
vendored
@ -49,15 +49,13 @@ type ImageConfig struct {
|
|||||||
// StopSignal contains the system call signal that will be sent to the container to exit.
|
// StopSignal contains the system call signal that will be sent to the container to exit.
|
||||||
StopSignal string `json:"StopSignal,omitempty"`
|
StopSignal string `json:"StopSignal,omitempty"`
|
||||||
|
|
||||||
// ArgsEscaped
|
// ArgsEscaped `[Deprecated]` - This field is present only for legacy
|
||||||
//
|
// compatibility with Docker and should not be used by new image builders.
|
||||||
// Deprecated: This field is present only for legacy compatibility with
|
// It is used by Docker for Windows images to indicate that the `Entrypoint`
|
||||||
// Docker and should not be used by new image builders. It is used by Docker
|
// or `Cmd` or both, contains only a single element array, that is a
|
||||||
// for Windows images to indicate that the `Entrypoint` or `Cmd` or both,
|
// pre-escaped, and combined into a single string `CommandLine`. If `true`
|
||||||
// contains only a single element array, that is a pre-escaped, and combined
|
// the value in `Entrypoint` or `Cmd` should be used as-is to avoid double
|
||||||
// into a single string `CommandLine`. If `true` the value in `Entrypoint` or
|
// escaping.
|
||||||
// `Cmd` should be used as-is to avoid double escaping.
|
|
||||||
// https://github.com/opencontainers/image-spec/pull/892
|
|
||||||
ArgsEscaped bool `json:"ArgsEscaped,omitempty"`
|
ArgsEscaped bool `json:"ArgsEscaped,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,8 +95,22 @@ type Image struct {
|
|||||||
// Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image.
|
// Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image.
|
||||||
Author string `json:"author,omitempty"`
|
Author string `json:"author,omitempty"`
|
||||||
|
|
||||||
// Platform describes the platform which the image in the manifest runs on.
|
// Architecture is the CPU architecture which the binaries in this image are built to run on.
|
||||||
Platform
|
Architecture string `json:"architecture"`
|
||||||
|
|
||||||
|
// Variant is the variant of the specified CPU architecture which image binaries are intended to run on.
|
||||||
|
Variant string `json:"variant,omitempty"`
|
||||||
|
|
||||||
|
// OS is the name of the operating system which the image is built to run on.
|
||||||
|
OS string `json:"os"`
|
||||||
|
|
||||||
|
// OSVersion is an optional field specifying the operating system
|
||||||
|
// version, for example on Windows `10.0.14393.1066`.
|
||||||
|
OSVersion string `json:"os.version,omitempty"`
|
||||||
|
|
||||||
|
// OSFeatures is an optional field specifying an array of strings,
|
||||||
|
// each listing a required OS feature (for example on Windows `win32k`).
|
||||||
|
OSFeatures []string `json:"os.features,omitempty"`
|
||||||
|
|
||||||
// Config defines the execution parameters which should be used as a base when running a container using the image.
|
// Config defines the execution parameters which should be used as a base when running a container using the image.
|
||||||
Config ImageConfig `json:"config,omitempty"`
|
Config ImageConfig `json:"config,omitempty"`
|
||||||
|
11
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
generated
vendored
11
vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
generated
vendored
@ -23,9 +23,6 @@ type Manifest struct {
|
|||||||
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
|
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
|
||||||
MediaType string `json:"mediaType,omitempty"`
|
MediaType string `json:"mediaType,omitempty"`
|
||||||
|
|
||||||
// ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.
|
|
||||||
ArtifactType string `json:"artifactType,omitempty"`
|
|
||||||
|
|
||||||
// Config references a configuration object for a container, by digest.
|
// Config references a configuration object for a container, by digest.
|
||||||
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
|
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
|
||||||
Config Descriptor `json:"config"`
|
Config Descriptor `json:"config"`
|
||||||
@ -39,11 +36,3 @@ type Manifest struct {
|
|||||||
// Annotations contains arbitrary metadata for the image manifest.
|
// Annotations contains arbitrary metadata for the image manifest.
|
||||||
Annotations map[string]string `json:"annotations,omitempty"`
|
Annotations map[string]string `json:"annotations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScratchDescriptor is the descriptor of a blob with content of `{}`.
|
|
||||||
var ScratchDescriptor = Descriptor{
|
|
||||||
MediaType: MediaTypeScratch,
|
|
||||||
Digest: `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`,
|
|
||||||
Size: 2,
|
|
||||||
Data: []byte(`{}`),
|
|
||||||
}
|
|
||||||
|
19
vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
generated
vendored
19
vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
generated
vendored
@ -40,36 +40,21 @@ const (
|
|||||||
|
|
||||||
// MediaTypeImageLayerNonDistributable is the media type for layers referenced by
|
// MediaTypeImageLayerNonDistributable is the media type for layers referenced by
|
||||||
// the manifest but with distribution restrictions.
|
// the manifest but with distribution restrictions.
|
||||||
//
|
|
||||||
// Deprecated: Non-distributable layers are deprecated, and not recommended
|
|
||||||
// for future use. Implementations SHOULD NOT produce new non-distributable
|
|
||||||
// layers.
|
|
||||||
// https://github.com/opencontainers/image-spec/pull/965
|
|
||||||
MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar"
|
MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar"
|
||||||
|
|
||||||
// MediaTypeImageLayerNonDistributableGzip is the media type for
|
// MediaTypeImageLayerNonDistributableGzip is the media type for
|
||||||
// gzipped layers referenced by the manifest but with distribution
|
// gzipped layers referenced by the manifest but with distribution
|
||||||
// restrictions.
|
// restrictions.
|
||||||
//
|
|
||||||
// Deprecated: Non-distributable layers are deprecated, and not recommended
|
|
||||||
// for future use. Implementations SHOULD NOT produce new non-distributable
|
|
||||||
// layers.
|
|
||||||
// https://github.com/opencontainers/image-spec/pull/965
|
|
||||||
MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip"
|
MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip"
|
||||||
|
|
||||||
// MediaTypeImageLayerNonDistributableZstd is the media type for zstd
|
// MediaTypeImageLayerNonDistributableZstd is the media type for zstd
|
||||||
// compressed layers referenced by the manifest but with distribution
|
// compressed layers referenced by the manifest but with distribution
|
||||||
// restrictions.
|
// restrictions.
|
||||||
//
|
|
||||||
// Deprecated: Non-distributable layers are deprecated, and not recommended
|
|
||||||
// for future use. Implementations SHOULD NOT produce new non-distributable
|
|
||||||
// layers.
|
|
||||||
// https://github.com/opencontainers/image-spec/pull/965
|
|
||||||
MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd"
|
MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd"
|
||||||
|
|
||||||
// MediaTypeImageConfig specifies the media type for the image configuration.
|
// MediaTypeImageConfig specifies the media type for the image configuration.
|
||||||
MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
|
MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
|
||||||
|
|
||||||
// MediaTypeScratch specifies the media type for an unused blob containing the value `{}`
|
// MediaTypeArtifactManifest specifies the media type for a content descriptor.
|
||||||
MediaTypeScratch = "application/vnd.oci.scratch.v1+json"
|
MediaTypeArtifactManifest = "application/vnd.oci.artifact.manifest.v1+json"
|
||||||
)
|
)
|
||||||
|
2
vendor/github.com/opencontainers/image-spec/specs-go/version.go
generated
vendored
2
vendor/github.com/opencontainers/image-spec/specs-go/version.go
generated
vendored
@ -25,7 +25,7 @@ const (
|
|||||||
VersionPatch = 0
|
VersionPatch = 0
|
||||||
|
|
||||||
// VersionDev indicates development branch. Releases will be empty string.
|
// VersionDev indicates development branch. Releases will be empty string.
|
||||||
VersionDev = "-rc.3"
|
VersionDev = "-dev"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version is the specification version that the package types support.
|
// Version is the specification version that the package types support.
|
||||||
|
111
vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
generated
vendored
111
vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
generated
vendored
@ -33,34 +33,6 @@ type Spec struct {
|
|||||||
ZOS *ZOS `json:"zos,omitempty" platform:"zos"`
|
ZOS *ZOS `json:"zos,omitempty" platform:"zos"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scheduler represents the scheduling attributes for a process. It is based on
|
|
||||||
// the Linux sched_setattr(2) syscall.
|
|
||||||
type Scheduler struct {
|
|
||||||
// Policy represents the scheduling policy (e.g., SCHED_FIFO, SCHED_RR, SCHED_OTHER).
|
|
||||||
Policy LinuxSchedulerPolicy `json:"policy"`
|
|
||||||
|
|
||||||
// Nice is the nice value for the process, which affects its priority.
|
|
||||||
Nice int32 `json:"nice,omitempty"`
|
|
||||||
|
|
||||||
// Priority represents the static priority of the process.
|
|
||||||
Priority int32 `json:"priority,omitempty"`
|
|
||||||
|
|
||||||
// Flags is an array of scheduling flags.
|
|
||||||
Flags []LinuxSchedulerFlag `json:"flags,omitempty"`
|
|
||||||
|
|
||||||
// The following ones are used by the DEADLINE scheduler.
|
|
||||||
|
|
||||||
// Runtime is the amount of time in nanoseconds during which the process
|
|
||||||
// is allowed to run in a given period.
|
|
||||||
Runtime uint64 `json:"runtime,omitempty"`
|
|
||||||
|
|
||||||
// Deadline is the absolute deadline for the process to complete its execution.
|
|
||||||
Deadline uint64 `json:"deadline,omitempty"`
|
|
||||||
|
|
||||||
// Period is the length of the period in nanoseconds used for determining the process runtime.
|
|
||||||
Period uint64 `json:"period,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process contains information to start a specific application inside the container.
|
// Process contains information to start a specific application inside the container.
|
||||||
type Process struct {
|
type Process struct {
|
||||||
// Terminal creates an interactive terminal for the container.
|
// Terminal creates an interactive terminal for the container.
|
||||||
@ -88,12 +60,8 @@ type Process struct {
|
|||||||
ApparmorProfile string `json:"apparmorProfile,omitempty" platform:"linux"`
|
ApparmorProfile string `json:"apparmorProfile,omitempty" platform:"linux"`
|
||||||
// Specify an oom_score_adj for the container.
|
// Specify an oom_score_adj for the container.
|
||||||
OOMScoreAdj *int `json:"oomScoreAdj,omitempty" platform:"linux"`
|
OOMScoreAdj *int `json:"oomScoreAdj,omitempty" platform:"linux"`
|
||||||
// Scheduler specifies the scheduling attributes for a process
|
|
||||||
Scheduler *Scheduler `json:"scheduler,omitempty" platform:"linux"`
|
|
||||||
// SelinuxLabel specifies the selinux context that the container process is run as.
|
// SelinuxLabel specifies the selinux context that the container process is run as.
|
||||||
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
|
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
|
||||||
// IOPriority contains the I/O priority settings for the cgroup.
|
|
||||||
IOPriority *LinuxIOPriority `json:"ioPriority,omitempty" platform:"linux"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxCapabilities specifies the list of allowed capabilities that are kept for a process.
|
// LinuxCapabilities specifies the list of allowed capabilities that are kept for a process.
|
||||||
@ -111,22 +79,6 @@ type LinuxCapabilities struct {
|
|||||||
Ambient []string `json:"ambient,omitempty" platform:"linux"`
|
Ambient []string `json:"ambient,omitempty" platform:"linux"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOPriority represents I/O priority settings for the container's processes within the process group.
|
|
||||||
type LinuxIOPriority struct {
|
|
||||||
Class IOPriorityClass `json:"class"`
|
|
||||||
Priority int `json:"priority"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// IOPriorityClass represents an I/O scheduling class.
|
|
||||||
type IOPriorityClass string
|
|
||||||
|
|
||||||
// Possible values for IOPriorityClass.
|
|
||||||
const (
|
|
||||||
IOPRIO_CLASS_RT IOPriorityClass = "IOPRIO_CLASS_RT"
|
|
||||||
IOPRIO_CLASS_BE IOPriorityClass = "IOPRIO_CLASS_BE"
|
|
||||||
IOPRIO_CLASS_IDLE IOPriorityClass = "IOPRIO_CLASS_IDLE"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Box specifies dimensions of a rectangle. Used for specifying the size of a console.
|
// Box specifies dimensions of a rectangle. Used for specifying the size of a console.
|
||||||
type Box struct {
|
type Box struct {
|
||||||
// Height is the vertical dimension of a box.
|
// Height is the vertical dimension of a box.
|
||||||
@ -239,8 +191,6 @@ type Linux struct {
|
|||||||
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
|
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
|
||||||
// Personality contains configuration for the Linux personality syscall
|
// Personality contains configuration for the Linux personality syscall
|
||||||
Personality *LinuxPersonality `json:"personality,omitempty"`
|
Personality *LinuxPersonality `json:"personality,omitempty"`
|
||||||
// TimeOffsets specifies the offset for supporting time namespaces.
|
|
||||||
TimeOffsets map[string]LinuxTimeOffset `json:"timeOffsets,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxNamespace is the configuration for a Linux namespace
|
// LinuxNamespace is the configuration for a Linux namespace
|
||||||
@ -270,8 +220,6 @@ const (
|
|||||||
UserNamespace LinuxNamespaceType = "user"
|
UserNamespace LinuxNamespaceType = "user"
|
||||||
// CgroupNamespace for isolating cgroup hierarchies
|
// CgroupNamespace for isolating cgroup hierarchies
|
||||||
CgroupNamespace LinuxNamespaceType = "cgroup"
|
CgroupNamespace LinuxNamespaceType = "cgroup"
|
||||||
// TimeNamespace for isolating the clocks
|
|
||||||
TimeNamespace LinuxNamespaceType = "time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// LinuxIDMapping specifies UID/GID mappings
|
// LinuxIDMapping specifies UID/GID mappings
|
||||||
@ -284,14 +232,6 @@ type LinuxIDMapping struct {
|
|||||||
Size uint32 `json:"size"`
|
Size uint32 `json:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxTimeOffset specifies the offset for Time Namespace
|
|
||||||
type LinuxTimeOffset struct {
|
|
||||||
// Secs is the offset of clock (in secs) in the container
|
|
||||||
Secs int64 `json:"secs,omitempty"`
|
|
||||||
// Nanosecs is the additional offset for Secs (in nanosecs)
|
|
||||||
Nanosecs uint32 `json:"nanosecs,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// POSIXRlimit type and restrictions
|
// POSIXRlimit type and restrictions
|
||||||
type POSIXRlimit struct {
|
type POSIXRlimit struct {
|
||||||
// Type of the rlimit to set
|
// Type of the rlimit to set
|
||||||
@ -302,13 +242,12 @@ type POSIXRlimit struct {
|
|||||||
Soft uint64 `json:"soft"`
|
Soft uint64 `json:"soft"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxHugepageLimit structure corresponds to limiting kernel hugepages.
|
// LinuxHugepageLimit structure corresponds to limiting kernel hugepages
|
||||||
// Default to reservation limits if supported. Otherwise fallback to page fault limits.
|
|
||||||
type LinuxHugepageLimit struct {
|
type LinuxHugepageLimit struct {
|
||||||
// Pagesize is the hugepage size.
|
// Pagesize is the hugepage size
|
||||||
// Format: "<size><unit-prefix>B' (e.g. 64KB, 2MB, 1GB, etc.).
|
// Format: "<size><unit-prefix>B' (e.g. 64KB, 2MB, 1GB, etc.)
|
||||||
Pagesize string `json:"pageSize"`
|
Pagesize string `json:"pageSize"`
|
||||||
// Limit is the limit of "hugepagesize" hugetlb reservations (if supported) or usage.
|
// Limit is the limit of "hugepagesize" hugetlb usage
|
||||||
Limit uint64 `json:"limit"`
|
Limit uint64 `json:"limit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,7 +382,7 @@ type LinuxResources struct {
|
|||||||
Pids *LinuxPids `json:"pids,omitempty"`
|
Pids *LinuxPids `json:"pids,omitempty"`
|
||||||
// BlockIO restriction configuration
|
// BlockIO restriction configuration
|
||||||
BlockIO *LinuxBlockIO `json:"blockIO,omitempty"`
|
BlockIO *LinuxBlockIO `json:"blockIO,omitempty"`
|
||||||
// Hugetlb limits (in bytes). Default to reservation limits if supported.
|
// Hugetlb limit (in bytes)
|
||||||
HugepageLimits []LinuxHugepageLimit `json:"hugepageLimits,omitempty"`
|
HugepageLimits []LinuxHugepageLimit `json:"hugepageLimits,omitempty"`
|
||||||
// Network restriction configuration
|
// Network restriction configuration
|
||||||
Network *LinuxNetwork `json:"network,omitempty"`
|
Network *LinuxNetwork `json:"network,omitempty"`
|
||||||
@ -837,43 +776,3 @@ type ZOSDevice struct {
|
|||||||
// Gid of the device.
|
// Gid of the device.
|
||||||
GID *uint32 `json:"gid,omitempty"`
|
GID *uint32 `json:"gid,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxSchedulerPolicy represents different scheduling policies used with the Linux Scheduler
|
|
||||||
type LinuxSchedulerPolicy string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// SchedOther is the default scheduling policy
|
|
||||||
SchedOther LinuxSchedulerPolicy = "SCHED_OTHER"
|
|
||||||
// SchedFIFO is the First-In-First-Out scheduling policy
|
|
||||||
SchedFIFO LinuxSchedulerPolicy = "SCHED_FIFO"
|
|
||||||
// SchedRR is the Round-Robin scheduling policy
|
|
||||||
SchedRR LinuxSchedulerPolicy = "SCHED_RR"
|
|
||||||
// SchedBatch is the Batch scheduling policy
|
|
||||||
SchedBatch LinuxSchedulerPolicy = "SCHED_BATCH"
|
|
||||||
// SchedISO is the Isolation scheduling policy
|
|
||||||
SchedISO LinuxSchedulerPolicy = "SCHED_ISO"
|
|
||||||
// SchedIdle is the Idle scheduling policy
|
|
||||||
SchedIdle LinuxSchedulerPolicy = "SCHED_IDLE"
|
|
||||||
// SchedDeadline is the Deadline scheduling policy
|
|
||||||
SchedDeadline LinuxSchedulerPolicy = "SCHED_DEADLINE"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LinuxSchedulerFlag represents the flags used by the Linux Scheduler.
|
|
||||||
type LinuxSchedulerFlag string
|
|
||||||
|
|
||||||
const (
|
|
||||||
// SchedFlagResetOnFork represents the reset on fork scheduling flag
|
|
||||||
SchedFlagResetOnFork LinuxSchedulerFlag = "SCHED_FLAG_RESET_ON_FORK"
|
|
||||||
// SchedFlagReclaim represents the reclaim scheduling flag
|
|
||||||
SchedFlagReclaim LinuxSchedulerFlag = "SCHED_FLAG_RECLAIM"
|
|
||||||
// SchedFlagDLOverrun represents the deadline overrun scheduling flag
|
|
||||||
SchedFlagDLOverrun LinuxSchedulerFlag = "SCHED_FLAG_DL_OVERRUN"
|
|
||||||
// SchedFlagKeepPolicy represents the keep policy scheduling flag
|
|
||||||
SchedFlagKeepPolicy LinuxSchedulerFlag = "SCHED_FLAG_KEEP_POLICY"
|
|
||||||
// SchedFlagKeepParams represents the keep parameters scheduling flag
|
|
||||||
SchedFlagKeepParams LinuxSchedulerFlag = "SCHED_FLAG_KEEP_PARAMS"
|
|
||||||
// SchedFlagUtilClampMin represents the utilization clamp minimum scheduling flag
|
|
||||||
SchedFlagUtilClampMin LinuxSchedulerFlag = "SCHED_FLAG_UTIL_CLAMP_MIN"
|
|
||||||
// SchedFlagUtilClampMin represents the utilization clamp maximum scheduling flag
|
|
||||||
SchedFlagUtilClampMax LinuxSchedulerFlag = "SCHED_FLAG_UTIL_CLAMP_MAX"
|
|
||||||
)
|
|
||||||
|
2
vendor/github.com/opencontainers/runtime-spec/specs-go/version.go
generated
vendored
2
vendor/github.com/opencontainers/runtime-spec/specs-go/version.go
generated
vendored
@ -11,7 +11,7 @@ const (
|
|||||||
VersionPatch = 0
|
VersionPatch = 0
|
||||||
|
|
||||||
// VersionDev indicates development branch. Releases will be empty string.
|
// VersionDev indicates development branch. Releases will be empty string.
|
||||||
VersionDev = "-rc.3"
|
VersionDev = "-rc.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version is the specification version that the package types support.
|
// Version is the specification version that the package types support.
|
||||||
|
11
vendor/github.com/openfaas/faas-provider/serve.go
generated
vendored
11
vendor/github.com/openfaas/faas-provider/serve.go
generated
vendored
@ -78,17 +78,6 @@ func Serve(handlers *types.FaaSHandlers, config *types.FaaSConfig) {
|
|||||||
|
|
||||||
r.HandleFunc("/system/namespaces", hm.InstrumentHandler(handlers.ListNamespaces, "")).Methods(http.MethodGet)
|
r.HandleFunc("/system/namespaces", hm.InstrumentHandler(handlers.ListNamespaces, "")).Methods(http.MethodGet)
|
||||||
|
|
||||||
// Only register the mutate namespace handler if it is defined
|
|
||||||
if handlers.MutateNamespace != nil {
|
|
||||||
r.HandleFunc("/system/namespace/{namespace:["+NameExpression+"]+}",
|
|
||||||
hm.InstrumentHandler(handlers.MutateNamespace, "")).Methods(http.MethodPost, http.MethodDelete, http.MethodPut, http.MethodGet)
|
|
||||||
} else {
|
|
||||||
r.HandleFunc("/system/namespace/{namespace:["+NameExpression+"]+}",
|
|
||||||
hm.InstrumentHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
http.Error(w, "Feature not implemented in this version of OpenFaaS", http.StatusNotImplemented)
|
|
||||||
}), "")).Methods(http.MethodGet)
|
|
||||||
}
|
|
||||||
|
|
||||||
proxyHandler := handlers.FunctionProxy
|
proxyHandler := handlers.FunctionProxy
|
||||||
|
|
||||||
// Open endpoints
|
// Open endpoints
|
||||||
|
5
vendor/github.com/openfaas/faas-provider/types/config.go
generated
vendored
5
vendor/github.com/openfaas/faas-provider/types/config.go
generated
vendored
@ -12,13 +12,8 @@ const (
|
|||||||
|
|
||||||
// FaaSHandlers provide handlers for OpenFaaS
|
// FaaSHandlers provide handlers for OpenFaaS
|
||||||
type FaaSHandlers struct {
|
type FaaSHandlers struct {
|
||||||
// ListNamespace lists namespaces which are annotated for OpenFaaS
|
|
||||||
ListNamespaces http.HandlerFunc
|
ListNamespaces http.HandlerFunc
|
||||||
|
|
||||||
// MutateNamespace mutates a namespace to be annotated for OpenFaaS
|
|
||||||
// each namespace must contain an annotation of "openfaas=1"
|
|
||||||
MutateNamespace http.HandlerFunc
|
|
||||||
|
|
||||||
// FunctionProxy provides the function invocation proxy logic. Use proxy.NewHandlerFunc to
|
// FunctionProxy provides the function invocation proxy logic. Use proxy.NewHandlerFunc to
|
||||||
// use the standard OpenFaaS proxy implementation or provide completely custom proxy logic.
|
// use the standard OpenFaaS proxy implementation or provide completely custom proxy logic.
|
||||||
FunctionProxy http.HandlerFunc
|
FunctionProxy http.HandlerFunc
|
||||||
|
21
vendor/github.com/openfaas/faas-provider/types/read_config.go
generated
vendored
21
vendor/github.com/openfaas/faas-provider/types/read_config.go
generated
vendored
@ -1,7 +1,6 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -56,26 +55,6 @@ func ParseIntOrDurationValue(val string, fallback time.Duration) time.Duration {
|
|||||||
return duration
|
return duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseIntOrDurationValue interprets a string representing an int or duration and returns
|
|
||||||
// an int as the number of seconds. An error is returned if val can not be parsed as int or duration.
|
|
||||||
func ParseIntOrDuration(val string) (int, error) {
|
|
||||||
i, err := strconv.ParseInt(val, 10, 0)
|
|
||||||
if err == nil {
|
|
||||||
return int(i), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil && errors.Is(err, strconv.ErrRange) {
|
|
||||||
return int(i), err
|
|
||||||
}
|
|
||||||
|
|
||||||
d, err := time.ParseDuration(val)
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return int(d.Seconds()), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParseBoolValue parses the the boolean in val or, if there is an error, returns the
|
// ParseBoolValue parses the the boolean in val or, if there is an error, returns the
|
||||||
// specified default value
|
// specified default value
|
||||||
func ParseBoolValue(val string, fallback bool) bool {
|
func ParseBoolValue(val string, fallback bool) bool {
|
||||||
|
9
vendor/github.com/openfaas/faas-provider/types/requests.go
generated
vendored
9
vendor/github.com/openfaas/faas-provider/types/requests.go
generated
vendored
@ -27,12 +27,3 @@ type VersionInfo struct {
|
|||||||
SHA string `json:"sha"`
|
SHA string `json:"sha"`
|
||||||
Release string `json:"release"`
|
Release string `json:"release"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FunctionNamespace is required for use with the /system/namespace/NAME endpoint
|
|
||||||
// for deletions, just pass the namespace field.
|
|
||||||
type FunctionNamespace struct {
|
|
||||||
Namespace string `json:"namespace"`
|
|
||||||
|
|
||||||
Annotations map[string]string `json:"annotations,omitempty"`
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
|
||||||
}
|
|
||||||
|
2
vendor/github.com/spf13/cobra/.golangci.yml
generated
vendored
2
vendor/github.com/spf13/cobra/.golangci.yml
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2013-2023 The Cobra Authors
|
# Copyright 2013-2022 The Cobra Authors
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
8
vendor/github.com/spf13/cobra/Makefile
generated
vendored
8
vendor/github.com/spf13/cobra/Makefile
generated
vendored
@ -5,6 +5,10 @@ ifeq (, $(shell which golangci-lint))
|
|||||||
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (, $(shell which richgo))
|
||||||
|
$(warning "could not find richgo in $(PATH), run: go install github.com/kyoh86/richgo@latest")
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: fmt lint test install_deps clean
|
.PHONY: fmt lint test install_deps clean
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
@ -21,10 +25,6 @@ lint:
|
|||||||
|
|
||||||
test: install_deps
|
test: install_deps
|
||||||
$(info ******************** running tests ********************)
|
$(info ******************** running tests ********************)
|
||||||
go test -v ./...
|
|
||||||
|
|
||||||
richtest: install_deps
|
|
||||||
$(info ******************** running tests with kyoh86/richgo ********************)
|
|
||||||
richgo test -v ./...
|
richgo test -v ./...
|
||||||
|
|
||||||
install_deps:
|
install_deps:
|
||||||
|
4
vendor/github.com/spf13/cobra/README.md
generated
vendored
4
vendor/github.com/spf13/cobra/README.md
generated
vendored
@ -1,4 +1,4 @@
|
|||||||

|

|
||||||
|
|
||||||
Cobra is a library for creating powerful modern CLI applications.
|
Cobra is a library for creating powerful modern CLI applications.
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ Cobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/),
|
|||||||
[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to
|
[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to
|
||||||
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
|
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
|
||||||
|
|
||||||
[](https://github.com/spf13/cobra/actions?query=workflow%3ATest)
|
[](https://github.com/spf13/cobra/actions?query=workflow%3ATest)
|
||||||
[](https://pkg.go.dev/github.com/spf13/cobra)
|
[](https://pkg.go.dev/github.com/spf13/cobra)
|
||||||
[](https://goreportcard.com/report/github.com/spf13/cobra)
|
[](https://goreportcard.com/report/github.com/spf13/cobra)
|
||||||
[](https://gophers.slack.com/archives/CD3LP1199)
|
[](https://gophers.slack.com/archives/CD3LP1199)
|
||||||
|
2
vendor/github.com/spf13/cobra/active_help.go
generated
vendored
2
vendor/github.com/spf13/cobra/active_help.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
4
vendor/github.com/spf13/cobra/args.go
generated
vendored
4
vendor/github.com/spf13/cobra/args.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
type PositionalArgs func(cmd *Command, args []string) error
|
type PositionalArgs func(cmd *Command, args []string) error
|
||||||
|
|
||||||
// legacyArgs validation has the following behaviour:
|
// Legacy arg validation has the following behaviour:
|
||||||
// - root commands with no subcommands can take arbitrary arguments
|
// - root commands with no subcommands can take arbitrary arguments
|
||||||
// - root commands with subcommands will do subcommand validity checking
|
// - root commands with subcommands will do subcommand validity checking
|
||||||
// - subcommands will always accept arbitrary arguments
|
// - subcommands will always accept arbitrary arguments
|
||||||
|
4
vendor/github.com/spf13/cobra/bash_completions.go
generated
vendored
4
vendor/github.com/spf13/cobra/bash_completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -532,7 +532,7 @@ func writeLocalNonPersistentFlag(buf io.StringWriter, flag *pflag.Flag) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepareCustomAnnotationsForFlags setup annotations for go completions for registered flags
|
// Setup annotations for go completions for registered flags
|
||||||
func prepareCustomAnnotationsForFlags(cmd *Command) {
|
func prepareCustomAnnotationsForFlags(cmd *Command) {
|
||||||
flagCompletionMutex.RLock()
|
flagCompletionMutex.RLock()
|
||||||
defer flagCompletionMutex.RUnlock()
|
defer flagCompletionMutex.RUnlock()
|
||||||
|
71
vendor/github.com/spf13/cobra/bash_completionsV2.go
generated
vendored
71
vendor/github.com/spf13/cobra/bash_completionsV2.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -38,7 +38,7 @@ func genBashComp(buf io.StringWriter, name string, includeDesc bool) {
|
|||||||
|
|
||||||
__%[1]s_debug()
|
__%[1]s_debug()
|
||||||
{
|
{
|
||||||
if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then
|
if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
|
||||||
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
|
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ __%[1]s_get_completion_results() {
|
|||||||
lastChar=${lastParam:$((${#lastParam}-1)):1}
|
lastChar=${lastParam:$((${#lastParam}-1)):1}
|
||||||
__%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}"
|
__%[1]s_debug "lastParam ${lastParam}, lastChar ${lastChar}"
|
||||||
|
|
||||||
if [[ -z ${cur} && ${lastChar} != = ]]; then
|
if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then
|
||||||
# If the last parameter is complete (there is a space following it)
|
# If the last parameter is complete (there is a space following it)
|
||||||
# We add an extra empty parameter so we can indicate this to the go method.
|
# We add an extra empty parameter so we can indicate this to the go method.
|
||||||
__%[1]s_debug "Adding extra empty parameter"
|
__%[1]s_debug "Adding extra empty parameter"
|
||||||
@ -75,7 +75,7 @@ __%[1]s_get_completion_results() {
|
|||||||
# When completing a flag with an = (e.g., %[1]s -n=<TAB>)
|
# When completing a flag with an = (e.g., %[1]s -n=<TAB>)
|
||||||
# bash focuses on the part after the =, so we need to remove
|
# bash focuses on the part after the =, so we need to remove
|
||||||
# the flag part from $cur
|
# the flag part from $cur
|
||||||
if [[ ${cur} == -*=* ]]; then
|
if [[ "${cur}" == -*=* ]]; then
|
||||||
cur="${cur#*=}"
|
cur="${cur#*=}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ __%[1]s_get_completion_results() {
|
|||||||
directive=${out##*:}
|
directive=${out##*:}
|
||||||
# Remove the directive
|
# Remove the directive
|
||||||
out=${out%%:*}
|
out=${out%%:*}
|
||||||
if [[ ${directive} == "${out}" ]]; then
|
if [ "${directive}" = "${out}" ]; then
|
||||||
# There is not directive specified
|
# There is not directive specified
|
||||||
directive=0
|
directive=0
|
||||||
fi
|
fi
|
||||||
@ -101,36 +101,22 @@ __%[1]s_process_completion_results() {
|
|||||||
local shellCompDirectiveNoFileComp=%[5]d
|
local shellCompDirectiveNoFileComp=%[5]d
|
||||||
local shellCompDirectiveFilterFileExt=%[6]d
|
local shellCompDirectiveFilterFileExt=%[6]d
|
||||||
local shellCompDirectiveFilterDirs=%[7]d
|
local shellCompDirectiveFilterDirs=%[7]d
|
||||||
local shellCompDirectiveKeepOrder=%[8]d
|
|
||||||
|
|
||||||
if (((directive & shellCompDirectiveError) != 0)); then
|
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
|
||||||
# Error code. No completion.
|
# Error code. No completion.
|
||||||
__%[1]s_debug "Received error from custom completion go code"
|
__%[1]s_debug "Received error from custom completion go code"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if (((directive & shellCompDirectiveNoSpace) != 0)); then
|
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
|
||||||
if [[ $(type -t compopt) == builtin ]]; then
|
if [[ $(type -t compopt) = "builtin" ]]; then
|
||||||
__%[1]s_debug "Activating no space"
|
__%[1]s_debug "Activating no space"
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
else
|
else
|
||||||
__%[1]s_debug "No space directive not supported in this version of bash"
|
__%[1]s_debug "No space directive not supported in this version of bash"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if (((directive & shellCompDirectiveKeepOrder) != 0)); then
|
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
|
||||||
if [[ $(type -t compopt) == builtin ]]; then
|
if [[ $(type -t compopt) = "builtin" ]]; then
|
||||||
# no sort isn't supported for bash less than < 4.4
|
|
||||||
if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then
|
|
||||||
__%[1]s_debug "No sort directive not supported in this version of bash"
|
|
||||||
else
|
|
||||||
__%[1]s_debug "Activating keep order"
|
|
||||||
compopt -o nosort
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
__%[1]s_debug "No sort directive not supported in this version of bash"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if (((directive & shellCompDirectiveNoFileComp) != 0)); then
|
|
||||||
if [[ $(type -t compopt) == builtin ]]; then
|
|
||||||
__%[1]s_debug "Activating no file completion"
|
__%[1]s_debug "Activating no file completion"
|
||||||
compopt +o default
|
compopt +o default
|
||||||
else
|
else
|
||||||
@ -144,7 +130,7 @@ __%[1]s_process_completion_results() {
|
|||||||
local activeHelp=()
|
local activeHelp=()
|
||||||
__%[1]s_extract_activeHelp
|
__%[1]s_extract_activeHelp
|
||||||
|
|
||||||
if (((directive & shellCompDirectiveFilterFileExt) != 0)); then
|
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
|
||||||
# File extension filtering
|
# File extension filtering
|
||||||
local fullFilter filter filteringCmd
|
local fullFilter filter filteringCmd
|
||||||
|
|
||||||
@ -157,12 +143,13 @@ __%[1]s_process_completion_results() {
|
|||||||
filteringCmd="_filedir $fullFilter"
|
filteringCmd="_filedir $fullFilter"
|
||||||
__%[1]s_debug "File filtering command: $filteringCmd"
|
__%[1]s_debug "File filtering command: $filteringCmd"
|
||||||
$filteringCmd
|
$filteringCmd
|
||||||
elif (((directive & shellCompDirectiveFilterDirs) != 0)); then
|
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
|
||||||
# File completion for directories only
|
# File completion for directories only
|
||||||
|
|
||||||
|
# Use printf to strip any trailing newline
|
||||||
local subdir
|
local subdir
|
||||||
subdir=${completions[0]}
|
subdir=$(printf "%%s" "${completions[0]}")
|
||||||
if [[ -n $subdir ]]; then
|
if [ -n "$subdir" ]; then
|
||||||
__%[1]s_debug "Listing directories in $subdir"
|
__%[1]s_debug "Listing directories in $subdir"
|
||||||
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
|
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
|
||||||
else
|
else
|
||||||
@ -177,7 +164,7 @@ __%[1]s_process_completion_results() {
|
|||||||
__%[1]s_handle_special_char "$cur" =
|
__%[1]s_handle_special_char "$cur" =
|
||||||
|
|
||||||
# Print the activeHelp statements before we finish
|
# Print the activeHelp statements before we finish
|
||||||
if ((${#activeHelp[*]} != 0)); then
|
if [ ${#activeHelp[*]} -ne 0 ]; then
|
||||||
printf "\n";
|
printf "\n";
|
||||||
printf "%%s\n" "${activeHelp[@]}"
|
printf "%%s\n" "${activeHelp[@]}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@ -197,21 +184,21 @@ __%[1]s_process_completion_results() {
|
|||||||
# Separate activeHelp lines from real completions.
|
# Separate activeHelp lines from real completions.
|
||||||
# Fills the $activeHelp and $completions arrays.
|
# Fills the $activeHelp and $completions arrays.
|
||||||
__%[1]s_extract_activeHelp() {
|
__%[1]s_extract_activeHelp() {
|
||||||
local activeHelpMarker="%[9]s"
|
local activeHelpMarker="%[8]s"
|
||||||
local endIndex=${#activeHelpMarker}
|
local endIndex=${#activeHelpMarker}
|
||||||
|
|
||||||
while IFS='' read -r comp; do
|
while IFS='' read -r comp; do
|
||||||
if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then
|
if [ "${comp:0:endIndex}" = "$activeHelpMarker" ]; then
|
||||||
comp=${comp:endIndex}
|
comp=${comp:endIndex}
|
||||||
__%[1]s_debug "ActiveHelp found: $comp"
|
__%[1]s_debug "ActiveHelp found: $comp"
|
||||||
if [[ -n $comp ]]; then
|
if [ -n "$comp" ]; then
|
||||||
activeHelp+=("$comp")
|
activeHelp+=("$comp")
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Not an activeHelp line but a normal completion
|
# Not an activeHelp line but a normal completion
|
||||||
completions+=("$comp")
|
completions+=("$comp")
|
||||||
fi
|
fi
|
||||||
done <<<"${out}"
|
done < <(printf "%%s\n" "${out}")
|
||||||
}
|
}
|
||||||
|
|
||||||
__%[1]s_handle_completion_types() {
|
__%[1]s_handle_completion_types() {
|
||||||
@ -267,7 +254,7 @@ __%[1]s_handle_standard_completion_case() {
|
|||||||
done < <(printf "%%s\n" "${completions[@]}")
|
done < <(printf "%%s\n" "${completions[@]}")
|
||||||
|
|
||||||
# If there is a single completion left, remove the description text
|
# If there is a single completion left, remove the description text
|
||||||
if ((${#COMPREPLY[*]} == 1)); then
|
if [ ${#COMPREPLY[*]} -eq 1 ]; then
|
||||||
__%[1]s_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
|
__%[1]s_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
|
||||||
comp="${COMPREPLY[0]%%%%$tab*}"
|
comp="${COMPREPLY[0]%%%%$tab*}"
|
||||||
__%[1]s_debug "Removed description from single completion, which is now: ${comp}"
|
__%[1]s_debug "Removed description from single completion, which is now: ${comp}"
|
||||||
@ -284,8 +271,8 @@ __%[1]s_handle_special_char()
|
|||||||
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
|
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
|
||||||
local word=${comp%%"${comp##*${char}}"}
|
local word=${comp%%"${comp##*${char}}"}
|
||||||
local idx=${#COMPREPLY[*]}
|
local idx=${#COMPREPLY[*]}
|
||||||
while ((--idx >= 0)); do
|
while [[ $((--idx)) -ge 0 ]]; do
|
||||||
COMPREPLY[idx]=${COMPREPLY[idx]#"$word"}
|
COMPREPLY[$idx]=${COMPREPLY[$idx]#"$word"}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -311,7 +298,7 @@ __%[1]s_format_comp_descriptions()
|
|||||||
|
|
||||||
# Make sure we can fit a description of at least 8 characters
|
# Make sure we can fit a description of at least 8 characters
|
||||||
# if we are to align the descriptions.
|
# if we are to align the descriptions.
|
||||||
if ((maxdesclength > 8)); then
|
if [[ $maxdesclength -gt 8 ]]; then
|
||||||
# Add the proper number of spaces to align the descriptions
|
# Add the proper number of spaces to align the descriptions
|
||||||
for ((i = ${#comp} ; i < longest ; i++)); do
|
for ((i = ${#comp} ; i < longest ; i++)); do
|
||||||
comp+=" "
|
comp+=" "
|
||||||
@ -323,8 +310,8 @@ __%[1]s_format_comp_descriptions()
|
|||||||
|
|
||||||
# If there is enough space for any description text,
|
# If there is enough space for any description text,
|
||||||
# truncate the descriptions that are too long for the shell width
|
# truncate the descriptions that are too long for the shell width
|
||||||
if ((maxdesclength > 0)); then
|
if [ $maxdesclength -gt 0 ]; then
|
||||||
if ((${#desc} > maxdesclength)); then
|
if [ ${#desc} -gt $maxdesclength ]; then
|
||||||
desc=${desc:0:$(( maxdesclength - 1 ))}
|
desc=${desc:0:$(( maxdesclength - 1 ))}
|
||||||
desc+="…"
|
desc+="…"
|
||||||
fi
|
fi
|
||||||
@ -345,9 +332,9 @@ __start_%[1]s()
|
|||||||
# Call _init_completion from the bash-completion package
|
# Call _init_completion from the bash-completion package
|
||||||
# to prepare the arguments properly
|
# to prepare the arguments properly
|
||||||
if declare -F _init_completion >/dev/null 2>&1; then
|
if declare -F _init_completion >/dev/null 2>&1; then
|
||||||
_init_completion -n =: || return
|
_init_completion -n "=:" || return
|
||||||
else
|
else
|
||||||
__%[1]s_init_completion -n =: || return
|
__%[1]s_init_completion -n "=:" || return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
__%[1]s_debug
|
__%[1]s_debug
|
||||||
@ -374,7 +361,7 @@ fi
|
|||||||
# ex: ts=4 sw=4 et filetype=sh
|
# ex: ts=4 sw=4 et filetype=sh
|
||||||
`, name, compCmd,
|
`, name, compCmd,
|
||||||
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
||||||
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,
|
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs,
|
||||||
activeHelpMarker))
|
activeHelpMarker))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
vendor/github.com/spf13/cobra/cobra.go
generated
vendored
6
vendor/github.com/spf13/cobra/cobra.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -167,8 +167,8 @@ func appendIfNotPresent(s, stringToAppend string) string {
|
|||||||
|
|
||||||
// rpad adds padding to the right of a string.
|
// rpad adds padding to the right of a string.
|
||||||
func rpad(s string, padding int) string {
|
func rpad(s string, padding int) string {
|
||||||
formattedString := fmt.Sprintf("%%-%ds", padding)
|
template := fmt.Sprintf("%%-%ds", padding)
|
||||||
return fmt.Sprintf(formattedString, s)
|
return fmt.Sprintf(template, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
// tmpl executes the given template text on data, writing the result to w.
|
// tmpl executes the given template text on data, writing the result to w.
|
||||||
|
54
vendor/github.com/spf13/cobra/command.go
generated
vendored
54
vendor/github.com/spf13/cobra/command.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -35,7 +35,7 @@ const FlagSetByCobraAnnotation = "cobra_annotation_flag_set_by_cobra"
|
|||||||
// FParseErrWhitelist configures Flag parse errors to be ignored
|
// FParseErrWhitelist configures Flag parse errors to be ignored
|
||||||
type FParseErrWhitelist flag.ParseErrorsWhitelist
|
type FParseErrWhitelist flag.ParseErrorsWhitelist
|
||||||
|
|
||||||
// Group Structure to manage groups for commands
|
// Structure to manage groups for commands
|
||||||
type Group struct {
|
type Group struct {
|
||||||
ID string
|
ID string
|
||||||
Title string
|
Title string
|
||||||
@ -47,7 +47,7 @@ type Group struct {
|
|||||||
// definition to ensure usability.
|
// definition to ensure usability.
|
||||||
type Command struct {
|
type Command struct {
|
||||||
// Use is the one-line usage message.
|
// Use is the one-line usage message.
|
||||||
// Recommended syntax is as follows:
|
// Recommended syntax is as follow:
|
||||||
// [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.
|
// [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.
|
||||||
// ... indicates that you can specify multiple values for the previous argument.
|
// ... indicates that you can specify multiple values for the previous argument.
|
||||||
// | indicates mutually exclusive information. You can use the argument to the left of the separator or the
|
// | indicates mutually exclusive information. You can use the argument to the left of the separator or the
|
||||||
@ -321,7 +321,7 @@ func (c *Command) SetHelpCommand(cmd *Command) {
|
|||||||
c.helpCommand = cmd
|
c.helpCommand = cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHelpCommandGroupID sets the group id of the help command.
|
// SetHelpCommandGroup sets the group id of the help command.
|
||||||
func (c *Command) SetHelpCommandGroupID(groupID string) {
|
func (c *Command) SetHelpCommandGroupID(groupID string) {
|
||||||
if c.helpCommand != nil {
|
if c.helpCommand != nil {
|
||||||
c.helpCommand.GroupID = groupID
|
c.helpCommand.GroupID = groupID
|
||||||
@ -330,7 +330,7 @@ func (c *Command) SetHelpCommandGroupID(groupID string) {
|
|||||||
c.helpCommandGroupID = groupID
|
c.helpCommandGroupID = groupID
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetCompletionCommandGroupID sets the group id of the completion command.
|
// SetCompletionCommandGroup sets the group id of the completion command.
|
||||||
func (c *Command) SetCompletionCommandGroupID(groupID string) {
|
func (c *Command) SetCompletionCommandGroupID(groupID string) {
|
||||||
// completionCommandGroupID is used if no completion command is defined by the user
|
// completionCommandGroupID is used if no completion command is defined by the user
|
||||||
c.Root().completionCommandGroupID = groupID
|
c.Root().completionCommandGroupID = groupID
|
||||||
@ -655,44 +655,20 @@ Loop:
|
|||||||
|
|
||||||
// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like
|
// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like
|
||||||
// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]).
|
// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]).
|
||||||
// Special care needs to be taken not to remove a flag value.
|
func argsMinusFirstX(args []string, x string) []string {
|
||||||
func (c *Command) argsMinusFirstX(args []string, x string) []string {
|
for i, y := range args {
|
||||||
if len(args) == 0 {
|
if x == y {
|
||||||
return args
|
ret := []string{}
|
||||||
}
|
ret = append(ret, args[:i]...)
|
||||||
c.mergePersistentFlags()
|
ret = append(ret, args[i+1:]...)
|
||||||
flags := c.Flags()
|
return ret
|
||||||
|
|
||||||
Loop:
|
|
||||||
for pos := 0; pos < len(args); pos++ {
|
|
||||||
s := args[pos]
|
|
||||||
switch {
|
|
||||||
case s == "--":
|
|
||||||
// -- means we have reached the end of the parseable args. Break out of the loop now.
|
|
||||||
break Loop
|
|
||||||
case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags):
|
|
||||||
fallthrough
|
|
||||||
case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags):
|
|
||||||
// This is a flag without a default value, and an equal sign is not used. Increment pos in order to skip
|
|
||||||
// over the next arg, because that is the value of this flag.
|
|
||||||
pos++
|
|
||||||
continue
|
|
||||||
case !strings.HasPrefix(s, "-"):
|
|
||||||
// This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so,
|
|
||||||
// return the args, excluding the one at this position.
|
|
||||||
if s == x {
|
|
||||||
ret := []string{}
|
|
||||||
ret = append(ret, args[:pos]...)
|
|
||||||
ret = append(ret, args[pos+1:]...)
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
|
||||||
func isFlagArg(arg string) bool {
|
func isFlagArg(arg string) bool {
|
||||||
return ((len(arg) >= 3 && arg[0:2] == "--") ||
|
return ((len(arg) >= 3 && arg[1] == '-') ||
|
||||||
(len(arg) >= 2 && arg[0] == '-' && arg[1] != '-'))
|
(len(arg) >= 2 && arg[0] == '-' && arg[1] != '-'))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -710,7 +686,7 @@ func (c *Command) Find(args []string) (*Command, []string, error) {
|
|||||||
|
|
||||||
cmd := c.findNext(nextSubCmd)
|
cmd := c.findNext(nextSubCmd)
|
||||||
if cmd != nil {
|
if cmd != nil {
|
||||||
return innerfind(cmd, c.argsMinusFirstX(innerArgs, nextSubCmd))
|
return innerfind(cmd, argsMinusFirstX(innerArgs, nextSubCmd))
|
||||||
}
|
}
|
||||||
return c, innerArgs
|
return c, innerArgs
|
||||||
}
|
}
|
||||||
@ -1296,7 +1272,7 @@ func (c *Command) AllChildCommandsHaveGroup() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainsGroup return if groupID exists in the list of command groups.
|
// ContainGroups return if groupID exists in the list of command groups.
|
||||||
func (c *Command) ContainsGroup(groupID string) bool {
|
func (c *Command) ContainsGroup(groupID string) bool {
|
||||||
for _, x := range c.commandgroups {
|
for _, x := range c.commandgroups {
|
||||||
if x.ID == groupID {
|
if x.ID == groupID {
|
||||||
|
2
vendor/github.com/spf13/cobra/command_notwin.go
generated
vendored
2
vendor/github.com/spf13/cobra/command_notwin.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
2
vendor/github.com/spf13/cobra/command_win.go
generated
vendored
2
vendor/github.com/spf13/cobra/command_win.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
13
vendor/github.com/spf13/cobra/completions.go
generated
vendored
13
vendor/github.com/spf13/cobra/completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -77,10 +77,6 @@ const (
|
|||||||
// obtain the same behavior but only for flags.
|
// obtain the same behavior but only for flags.
|
||||||
ShellCompDirectiveFilterDirs
|
ShellCompDirectiveFilterDirs
|
||||||
|
|
||||||
// ShellCompDirectiveKeepOrder indicates that the shell should preserve the order
|
|
||||||
// in which the completions are provided
|
|
||||||
ShellCompDirectiveKeepOrder
|
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
// All directives using iota should be above this one.
|
// All directives using iota should be above this one.
|
||||||
@ -163,9 +159,6 @@ func (d ShellCompDirective) string() string {
|
|||||||
if d&ShellCompDirectiveFilterDirs != 0 {
|
if d&ShellCompDirectiveFilterDirs != 0 {
|
||||||
directives = append(directives, "ShellCompDirectiveFilterDirs")
|
directives = append(directives, "ShellCompDirectiveFilterDirs")
|
||||||
}
|
}
|
||||||
if d&ShellCompDirectiveKeepOrder != 0 {
|
|
||||||
directives = append(directives, "ShellCompDirectiveKeepOrder")
|
|
||||||
}
|
|
||||||
if len(directives) == 0 {
|
if len(directives) == 0 {
|
||||||
directives = append(directives, "ShellCompDirectiveDefault")
|
directives = append(directives, "ShellCompDirectiveDefault")
|
||||||
}
|
}
|
||||||
@ -176,7 +169,7 @@ func (d ShellCompDirective) string() string {
|
|||||||
return strings.Join(directives, ", ")
|
return strings.Join(directives, ", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// initCompleteCmd adds a special hidden command that can be used to request custom completions.
|
// Adds a special hidden command that can be used to request custom completions.
|
||||||
func (c *Command) initCompleteCmd(args []string) {
|
func (c *Command) initCompleteCmd(args []string) {
|
||||||
completeCmd := &Command{
|
completeCmd := &Command{
|
||||||
Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd),
|
Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd),
|
||||||
@ -734,7 +727,7 @@ to enable it. You can execute the following once:
|
|||||||
|
|
||||||
To load completions in your current shell session:
|
To load completions in your current shell session:
|
||||||
|
|
||||||
source <(%[1]s completion zsh)
|
source <(%[1]s completion zsh); compdef _%[1]s %[1]s
|
||||||
|
|
||||||
To load completions for every new session, execute once:
|
To load completions for every new session, execute once:
|
||||||
|
|
||||||
|
78
vendor/github.com/spf13/cobra/fish_completions.go
generated
vendored
78
vendor/github.com/spf13/cobra/fish_completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -53,7 +53,7 @@ function __%[1]s_perform_completion
|
|||||||
__%[1]s_debug "last arg: $lastArg"
|
__%[1]s_debug "last arg: $lastArg"
|
||||||
|
|
||||||
# Disable ActiveHelp which is not supported for fish shell
|
# Disable ActiveHelp which is not supported for fish shell
|
||||||
set -l requestComp "%[10]s=0 $args[1] %[3]s $args[2..-1] $lastArg"
|
set -l requestComp "%[9]s=0 $args[1] %[3]s $args[2..-1] $lastArg"
|
||||||
|
|
||||||
__%[1]s_debug "Calling $requestComp"
|
__%[1]s_debug "Calling $requestComp"
|
||||||
set -l results (eval $requestComp 2> /dev/null)
|
set -l results (eval $requestComp 2> /dev/null)
|
||||||
@ -89,60 +89,6 @@ function __%[1]s_perform_completion
|
|||||||
printf "%%s\n" "$directiveLine"
|
printf "%%s\n" "$directiveLine"
|
||||||
end
|
end
|
||||||
|
|
||||||
# this function limits calls to __%[1]s_perform_completion, by caching the result behind $__%[1]s_perform_completion_once_result
|
|
||||||
function __%[1]s_perform_completion_once
|
|
||||||
__%[1]s_debug "Starting __%[1]s_perform_completion_once"
|
|
||||||
|
|
||||||
if test -n "$__%[1]s_perform_completion_once_result"
|
|
||||||
__%[1]s_debug "Seems like a valid result already exists, skipping __%[1]s_perform_completion"
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
set --global __%[1]s_perform_completion_once_result (__%[1]s_perform_completion)
|
|
||||||
if test -z "$__%[1]s_perform_completion_once_result"
|
|
||||||
__%[1]s_debug "No completions, probably due to a failure"
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
__%[1]s_debug "Performed completions and set __%[1]s_perform_completion_once_result"
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
# this function is used to clear the $__%[1]s_perform_completion_once_result variable after completions are run
|
|
||||||
function __%[1]s_clear_perform_completion_once_result
|
|
||||||
__%[1]s_debug ""
|
|
||||||
__%[1]s_debug "========= clearing previously set __%[1]s_perform_completion_once_result variable =========="
|
|
||||||
set --erase __%[1]s_perform_completion_once_result
|
|
||||||
__%[1]s_debug "Succesfully erased the variable __%[1]s_perform_completion_once_result"
|
|
||||||
end
|
|
||||||
|
|
||||||
function __%[1]s_requires_order_preservation
|
|
||||||
__%[1]s_debug ""
|
|
||||||
__%[1]s_debug "========= checking if order preservation is required =========="
|
|
||||||
|
|
||||||
__%[1]s_perform_completion_once
|
|
||||||
if test -z "$__%[1]s_perform_completion_once_result"
|
|
||||||
__%[1]s_debug "Error determining if order preservation is required"
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])
|
|
||||||
__%[1]s_debug "Directive is: $directive"
|
|
||||||
|
|
||||||
set -l shellCompDirectiveKeepOrder %[9]d
|
|
||||||
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) %% 2)
|
|
||||||
__%[1]s_debug "Keeporder is: $keeporder"
|
|
||||||
|
|
||||||
if test $keeporder -ne 0
|
|
||||||
__%[1]s_debug "This does require order preservation"
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
__%[1]s_debug "This doesn't require order preservation"
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# This function does two things:
|
# This function does two things:
|
||||||
# - Obtain the completions and store them in the global __%[1]s_comp_results
|
# - Obtain the completions and store them in the global __%[1]s_comp_results
|
||||||
# - Return false if file completion should be performed
|
# - Return false if file completion should be performed
|
||||||
@ -153,17 +99,17 @@ function __%[1]s_prepare_completions
|
|||||||
# Start fresh
|
# Start fresh
|
||||||
set --erase __%[1]s_comp_results
|
set --erase __%[1]s_comp_results
|
||||||
|
|
||||||
__%[1]s_perform_completion_once
|
set -l results (__%[1]s_perform_completion)
|
||||||
__%[1]s_debug "Completion results: $__%[1]s_perform_completion_once_result"
|
__%[1]s_debug "Completion results: $results"
|
||||||
|
|
||||||
if test -z "$__%[1]s_perform_completion_once_result"
|
if test -z "$results"
|
||||||
__%[1]s_debug "No completion, probably due to a failure"
|
__%[1]s_debug "No completion, probably due to a failure"
|
||||||
# Might as well do file completion, in case it helps
|
# Might as well do file completion, in case it helps
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])
|
set -l directive (string sub --start 2 $results[-1])
|
||||||
set --global __%[1]s_comp_results $__%[1]s_perform_completion_once_result[1..-2]
|
set --global __%[1]s_comp_results $results[1..-2]
|
||||||
|
|
||||||
__%[1]s_debug "Completions are: $__%[1]s_comp_results"
|
__%[1]s_debug "Completions are: $__%[1]s_comp_results"
|
||||||
__%[1]s_debug "Directive is: $directive"
|
__%[1]s_debug "Directive is: $directive"
|
||||||
@ -259,17 +205,13 @@ end
|
|||||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||||
complete -c %[2]s -e
|
complete -c %[2]s -e
|
||||||
|
|
||||||
# this will get called after the two calls below and clear the $__%[1]s_perform_completion_once_result global
|
|
||||||
complete -c %[2]s -n '__%[1]s_clear_perform_completion_once_result'
|
|
||||||
# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results
|
# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results
|
||||||
# which provides the program's completion choices.
|
# which provides the program's completion choices.
|
||||||
# If this doesn't require order preservation, we don't use the -k flag
|
complete -c %[2]s -n '__%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
|
||||||
complete -c %[2]s -n 'not __%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
|
|
||||||
# otherwise we use the -k flag
|
|
||||||
complete -k -c %[2]s -n '__%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
|
|
||||||
`, nameForVar, name, compCmd,
|
`, nameForVar, name, compCmd,
|
||||||
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
||||||
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))
|
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenFishCompletion generates fish completion file and writes to the passed writer.
|
// GenFishCompletion generates fish completion file and writes to the passed writer.
|
||||||
|
2
vendor/github.com/spf13/cobra/flag_groups.go
generated
vendored
2
vendor/github.com/spf13/cobra/flag_groups.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
27
vendor/github.com/spf13/cobra/powershell_completions.go
generated
vendored
27
vendor/github.com/spf13/cobra/powershell_completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -77,7 +77,6 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
|||||||
$ShellCompDirectiveNoFileComp=%[6]d
|
$ShellCompDirectiveNoFileComp=%[6]d
|
||||||
$ShellCompDirectiveFilterFileExt=%[7]d
|
$ShellCompDirectiveFilterFileExt=%[7]d
|
||||||
$ShellCompDirectiveFilterDirs=%[8]d
|
$ShellCompDirectiveFilterDirs=%[8]d
|
||||||
$ShellCompDirectiveKeepOrder=%[9]d
|
|
||||||
|
|
||||||
# Prepare the command to request completions for the program.
|
# Prepare the command to request completions for the program.
|
||||||
# Split the command at the first space to separate the program and arguments.
|
# Split the command at the first space to separate the program and arguments.
|
||||||
@ -107,22 +106,13 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
|||||||
# If the last parameter is complete (there is a space following it)
|
# If the last parameter is complete (there is a space following it)
|
||||||
# We add an extra empty parameter so we can indicate this to the go method.
|
# We add an extra empty parameter so we can indicate this to the go method.
|
||||||
__%[1]s_debug "Adding extra empty parameter"
|
__%[1]s_debug "Adding extra empty parameter"
|
||||||
# PowerShell 7.2+ changed the way how the arguments are passed to executables,
|
`+" # We need to use `\"`\" to pass an empty argument a \"\" or '' does not work!!!"+`
|
||||||
# so for pre-7.2 or when Legacy argument passing is enabled we need to use
|
`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+`
|
||||||
`+" # `\"`\" to pass an empty argument, a \"\" or '' does not work!!!"+`
|
|
||||||
if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or
|
|
||||||
($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or
|
|
||||||
(($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and
|
|
||||||
$PSNativeCommandArgumentPassing -eq 'Legacy')) {
|
|
||||||
`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+`
|
|
||||||
} else {
|
|
||||||
$RequestComp="$RequestComp" + ' ""'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__%[1]s_debug "Calling $RequestComp"
|
__%[1]s_debug "Calling $RequestComp"
|
||||||
# First disable ActiveHelp which is not supported for Powershell
|
# First disable ActiveHelp which is not supported for Powershell
|
||||||
$env:%[10]s=0
|
$env:%[9]s=0
|
||||||
|
|
||||||
#call the command store the output in $out and redirect stderr and stdout to null
|
#call the command store the output in $out and redirect stderr and stdout to null
|
||||||
# $Out is an array contains each line per element
|
# $Out is an array contains each line per element
|
||||||
@ -147,7 +137,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Longest = 0
|
$Longest = 0
|
||||||
[Array]$Values = $Out | ForEach-Object {
|
$Values = $Out | ForEach-Object {
|
||||||
#Split the output in name and description
|
#Split the output in name and description
|
||||||
`+" $Name, $Description = $_.Split(\"`t\",2)"+`
|
`+" $Name, $Description = $_.Split(\"`t\",2)"+`
|
||||||
__%[1]s_debug "Name: $Name Description: $Description"
|
__%[1]s_debug "Name: $Name Description: $Description"
|
||||||
@ -192,11 +182,6 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# we sort the values in ascending order by name if keep order isn't passed
|
|
||||||
if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) {
|
|
||||||
$Values = $Values | Sort-Object -Property Name
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {
|
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {
|
||||||
__%[1]s_debug "ShellCompDirectiveNoFileComp is called"
|
__%[1]s_debug "ShellCompDirectiveNoFileComp is called"
|
||||||
|
|
||||||
@ -282,7 +267,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
|
|||||||
Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock $__%[2]sCompleterBlock
|
Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock $__%[2]sCompleterBlock
|
||||||
`, name, nameForVar, compCmd,
|
`, name, nameForVar, compCmd,
|
||||||
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
||||||
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))
|
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error {
|
func (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error {
|
||||||
|
6
vendor/github.com/spf13/cobra/projects_using_cobra.md
generated
vendored
6
vendor/github.com/spf13/cobra/projects_using_cobra.md
generated
vendored
@ -1,13 +1,11 @@
|
|||||||
## Projects using Cobra
|
## Projects using Cobra
|
||||||
|
|
||||||
- [Allero](https://github.com/allero-io/allero)
|
- [Allero](https://github.com/allero-io/allero)
|
||||||
- [Arewefastyet](https://benchmark.vitess.io)
|
|
||||||
- [Arduino CLI](https://github.com/arduino/arduino-cli)
|
- [Arduino CLI](https://github.com/arduino/arduino-cli)
|
||||||
- [Bleve](https://blevesearch.com/)
|
- [Bleve](https://blevesearch.com/)
|
||||||
- [Cilium](https://cilium.io/)
|
- [Cilium](https://cilium.io/)
|
||||||
- [CloudQuery](https://github.com/cloudquery/cloudquery)
|
- [CloudQuery](https://github.com/cloudquery/cloudquery)
|
||||||
- [CockroachDB](https://www.cockroachlabs.com/)
|
- [CockroachDB](https://www.cockroachlabs.com/)
|
||||||
- [Constellation](https://github.com/edgelesssys/constellation)
|
|
||||||
- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)
|
- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)
|
||||||
- [Datree](https://github.com/datreeio/datree)
|
- [Datree](https://github.com/datreeio/datree)
|
||||||
- [Delve](https://github.com/derekparker/delve)
|
- [Delve](https://github.com/derekparker/delve)
|
||||||
@ -27,7 +25,7 @@
|
|||||||
- [Istio](https://istio.io)
|
- [Istio](https://istio.io)
|
||||||
- [Kool](https://github.com/kool-dev/kool)
|
- [Kool](https://github.com/kool-dev/kool)
|
||||||
- [Kubernetes](https://kubernetes.io/)
|
- [Kubernetes](https://kubernetes.io/)
|
||||||
- [Kubescape](https://github.com/kubescape/kubescape)
|
- [Kubescape](https://github.com/armosec/kubescape)
|
||||||
- [KubeVirt](https://github.com/kubevirt/kubevirt)
|
- [KubeVirt](https://github.com/kubevirt/kubevirt)
|
||||||
- [Linkerd](https://linkerd.io/)
|
- [Linkerd](https://linkerd.io/)
|
||||||
- [Mattermost-server](https://github.com/mattermost/mattermost-server)
|
- [Mattermost-server](https://github.com/mattermost/mattermost-server)
|
||||||
@ -53,12 +51,10 @@
|
|||||||
- [Random](https://github.com/erdaltsksn/random)
|
- [Random](https://github.com/erdaltsksn/random)
|
||||||
- [Rclone](https://rclone.org/)
|
- [Rclone](https://rclone.org/)
|
||||||
- [Scaleway CLI](https://github.com/scaleway/scaleway-cli)
|
- [Scaleway CLI](https://github.com/scaleway/scaleway-cli)
|
||||||
- [Sia](https://github.com/SiaFoundation/siad)
|
|
||||||
- [Skaffold](https://skaffold.dev/)
|
- [Skaffold](https://skaffold.dev/)
|
||||||
- [Tendermint](https://github.com/tendermint/tendermint)
|
- [Tendermint](https://github.com/tendermint/tendermint)
|
||||||
- [Twitch CLI](https://github.com/twitchdev/twitch-cli)
|
- [Twitch CLI](https://github.com/twitchdev/twitch-cli)
|
||||||
- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli)
|
- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli)
|
||||||
- [Vitess](https://vitess.io)
|
|
||||||
- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework)
|
- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework)
|
||||||
- [Werf](https://werf.io/)
|
- [Werf](https://werf.io/)
|
||||||
- [ZITADEL](https://github.com/zitadel/zitadel)
|
- [ZITADEL](https://github.com/zitadel/zitadel)
|
||||||
|
2
vendor/github.com/spf13/cobra/shell_completions.go
generated
vendored
2
vendor/github.com/spf13/cobra/shell_completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
30
vendor/github.com/spf13/cobra/shell_completions.md
generated
vendored
30
vendor/github.com/spf13/cobra/shell_completions.md
generated
vendored
@ -71,7 +71,7 @@ PowerShell:
|
|||||||
`,cmd.Root().Name()),
|
`,cmd.Root().Name()),
|
||||||
DisableFlagsInUseLine: true,
|
DisableFlagsInUseLine: true,
|
||||||
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
|
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
|
||||||
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
|
Args: cobra.ExactValidArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "bash":
|
case "bash":
|
||||||
@ -162,7 +162,16 @@ cmd := &cobra.Command{
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The aliases are shown to the user on tab completion only if no completions were found within sub-commands or `ValidArgs`.
|
The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by
|
||||||
|
the completion algorithm if entered manually, e.g. in:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ kubectl get rc [tab][tab]
|
||||||
|
backend frontend database
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that without declaring `rc` as an alias, the completion algorithm would not know to show the list of
|
||||||
|
replication controllers following `rc`.
|
||||||
|
|
||||||
### Dynamic completion of nouns
|
### Dynamic completion of nouns
|
||||||
|
|
||||||
@ -228,10 +237,6 @@ ShellCompDirectiveFilterFileExt
|
|||||||
// return []string{"themes"}, ShellCompDirectiveFilterDirs
|
// return []string{"themes"}, ShellCompDirectiveFilterDirs
|
||||||
//
|
//
|
||||||
ShellCompDirectiveFilterDirs
|
ShellCompDirectiveFilterDirs
|
||||||
|
|
||||||
// ShellCompDirectiveKeepOrder indicates that the shell should preserve the order
|
|
||||||
// in which the completions are provided
|
|
||||||
ShellCompDirectiveKeepOrder
|
|
||||||
```
|
```
|
||||||
|
|
||||||
***Note***: When using the `ValidArgsFunction`, Cobra will call your registered function after having parsed all flags and arguments provided in the command-line. You therefore don't need to do this parsing yourself. For example, when a user calls `helm status --namespace my-rook-ns [tab][tab]`, Cobra will call your registered `ValidArgsFunction` after having parsed the `--namespace` flag, as it would have done when calling the `RunE` function.
|
***Note***: When using the `ValidArgsFunction`, Cobra will call your registered function after having parsed all flags and arguments provided in the command-line. You therefore don't need to do this parsing yourself. For example, when a user calls `helm status --namespace my-rook-ns [tab][tab]`, Cobra will call your registered `ValidArgsFunction` after having parsed the `--namespace` flag, as it would have done when calling the `RunE` function.
|
||||||
@ -380,19 +385,6 @@ or
|
|||||||
```go
|
```go
|
||||||
ValidArgs: []string{"bash\tCompletions for bash", "zsh\tCompletions for zsh"}
|
ValidArgs: []string{"bash\tCompletions for bash", "zsh\tCompletions for zsh"}
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't want to show descriptions in the completions, you can add `--no-descriptions` to the default `completion` command to disable them, like:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ source <(helm completion bash)
|
|
||||||
$ helm completion [tab][tab]
|
|
||||||
bash (generate autocompletion script for bash) powershell (generate autocompletion script for powershell)
|
|
||||||
fish (generate autocompletion script for fish) zsh (generate autocompletion script for zsh)
|
|
||||||
|
|
||||||
$ source <(helm completion bash --no-descriptions)
|
|
||||||
$ helm completion [tab][tab]
|
|
||||||
bash fish powershell zsh
|
|
||||||
```
|
|
||||||
## Bash completions
|
## Bash completions
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
37
vendor/github.com/spf13/cobra/user_guide.md
generated
vendored
37
vendor/github.com/spf13/cobra/user_guide.md
generated
vendored
@ -188,37 +188,6 @@ var versionCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Organizing subcommands
|
|
||||||
|
|
||||||
A command may have subcommands which in turn may have other subcommands. This is achieved by using
|
|
||||||
`AddCommand`. In some cases, especially in larger applications, each subcommand may be defined in
|
|
||||||
its own go package.
|
|
||||||
|
|
||||||
The suggested approach is for the parent command to use `AddCommand` to add its most immediate
|
|
||||||
subcommands. For example, consider the following directory structure:
|
|
||||||
|
|
||||||
```text
|
|
||||||
├── cmd
|
|
||||||
│ ├── root.go
|
|
||||||
│ └── sub1
|
|
||||||
│ ├── sub1.go
|
|
||||||
│ └── sub2
|
|
||||||
│ ├── leafA.go
|
|
||||||
│ ├── leafB.go
|
|
||||||
│ └── sub2.go
|
|
||||||
└── main.go
|
|
||||||
```
|
|
||||||
|
|
||||||
In this case:
|
|
||||||
|
|
||||||
* The `init` function of `root.go` adds the command defined in `sub1.go` to the root command.
|
|
||||||
* The `init` function of `sub1.go` adds the command defined in `sub2.go` to the sub1 command.
|
|
||||||
* The `init` function of `sub2.go` adds the commands defined in `leafA.go` and `leafB.go` to the
|
|
||||||
sub2 command.
|
|
||||||
|
|
||||||
This approach ensures the subcommands are always included at compile time while avoiding cyclic
|
|
||||||
references.
|
|
||||||
|
|
||||||
### Returning and handling errors
|
### Returning and handling errors
|
||||||
|
|
||||||
If you wish to return an error to the caller of a command, `RunE` can be used.
|
If you wish to return an error to the caller of a command, `RunE` can be used.
|
||||||
@ -344,8 +313,8 @@ rootCmd.MarkFlagsRequiredTogether("username", "password")
|
|||||||
You can also prevent different flags from being provided together if they represent mutually
|
You can also prevent different flags from being provided together if they represent mutually
|
||||||
exclusive options such as specifying an output format as either `--json` or `--yaml` but never both:
|
exclusive options such as specifying an output format as either `--json` or `--yaml` but never both:
|
||||||
```go
|
```go
|
||||||
rootCmd.Flags().BoolVar(&ofJson, "json", false, "Output in JSON")
|
rootCmd.Flags().BoolVar(&u, "json", false, "Output in JSON")
|
||||||
rootCmd.Flags().BoolVar(&ofYaml, "yaml", false, "Output in YAML")
|
rootCmd.Flags().BoolVar(&pw, "yaml", false, "Output in YAML")
|
||||||
rootCmd.MarkFlagsMutuallyExclusive("json", "yaml")
|
rootCmd.MarkFlagsMutuallyExclusive("json", "yaml")
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -380,7 +349,7 @@ shown below:
|
|||||||
```go
|
```go
|
||||||
var cmd = &cobra.Command{
|
var cmd = &cobra.Command{
|
||||||
Short: "hello",
|
Short: "hello",
|
||||||
Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs),
|
Args: MatchAll(ExactArgs(2), OnlyValidArgs),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Println("Hello, World!")
|
fmt.Println("Hello, World!")
|
||||||
},
|
},
|
||||||
|
17
vendor/github.com/spf13/cobra/zsh_completions.go
generated
vendored
17
vendor/github.com/spf13/cobra/zsh_completions.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013-2023 The Cobra Authors
|
// Copyright 2013-2022 The Cobra Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -90,7 +90,6 @@ func genZshComp(buf io.StringWriter, name string, includeDesc bool) {
|
|||||||
compCmd = ShellCompNoDescRequestCmd
|
compCmd = ShellCompNoDescRequestCmd
|
||||||
}
|
}
|
||||||
WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s
|
WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s
|
||||||
compdef _%[1]s %[1]s
|
|
||||||
|
|
||||||
# zsh completion for %-36[1]s -*- shell-script -*-
|
# zsh completion for %-36[1]s -*- shell-script -*-
|
||||||
|
|
||||||
@ -109,9 +108,8 @@ _%[1]s()
|
|||||||
local shellCompDirectiveNoFileComp=%[5]d
|
local shellCompDirectiveNoFileComp=%[5]d
|
||||||
local shellCompDirectiveFilterFileExt=%[6]d
|
local shellCompDirectiveFilterFileExt=%[6]d
|
||||||
local shellCompDirectiveFilterDirs=%[7]d
|
local shellCompDirectiveFilterDirs=%[7]d
|
||||||
local shellCompDirectiveKeepOrder=%[8]d
|
|
||||||
|
|
||||||
local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder
|
local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
|
||||||
local -a completions
|
local -a completions
|
||||||
|
|
||||||
__%[1]s_debug "\n========= starting completion logic =========="
|
__%[1]s_debug "\n========= starting completion logic =========="
|
||||||
@ -179,7 +177,7 @@ _%[1]s()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local activeHelpMarker="%[9]s"
|
local activeHelpMarker="%[8]s"
|
||||||
local endIndex=${#activeHelpMarker}
|
local endIndex=${#activeHelpMarker}
|
||||||
local startIndex=$((${#activeHelpMarker}+1))
|
local startIndex=$((${#activeHelpMarker}+1))
|
||||||
local hasActiveHelp=0
|
local hasActiveHelp=0
|
||||||
@ -229,11 +227,6 @@ _%[1]s()
|
|||||||
noSpace="-S ''"
|
noSpace="-S ''"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then
|
|
||||||
__%[1]s_debug "Activating keep order."
|
|
||||||
keepOrder="-V"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
|
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
|
||||||
# File extension filtering
|
# File extension filtering
|
||||||
local filteringCmd
|
local filteringCmd
|
||||||
@ -269,7 +262,7 @@ _%[1]s()
|
|||||||
return $result
|
return $result
|
||||||
else
|
else
|
||||||
__%[1]s_debug "Calling _describe"
|
__%[1]s_debug "Calling _describe"
|
||||||
if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then
|
if eval _describe "completions" completions $flagPrefix $noSpace; then
|
||||||
__%[1]s_debug "_describe found some completions"
|
__%[1]s_debug "_describe found some completions"
|
||||||
|
|
||||||
# Return the success of having called _describe
|
# Return the success of having called _describe
|
||||||
@ -303,6 +296,6 @@ if [ "$funcstack[1]" = "_%[1]s" ]; then
|
|||||||
fi
|
fi
|
||||||
`, name, compCmd,
|
`, name, compCmd,
|
||||||
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
|
||||||
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,
|
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs,
|
||||||
activeHelpMarker))
|
activeHelpMarker))
|
||||||
}
|
}
|
||||||
|
6
vendor/golang.org/x/mod/semver/semver.go
generated
vendored
6
vendor/golang.org/x/mod/semver/semver.go
generated
vendored
@ -140,7 +140,7 @@ func Compare(v, w string) int {
|
|||||||
// Max canonicalizes its arguments and then returns the version string
|
// Max canonicalizes its arguments and then returns the version string
|
||||||
// that compares greater.
|
// that compares greater.
|
||||||
//
|
//
|
||||||
// Deprecated: use [Compare] instead. In most cases, returning a canonicalized
|
// Deprecated: use Compare instead. In most cases, returning a canonicalized
|
||||||
// version is not expected or desired.
|
// version is not expected or desired.
|
||||||
func Max(v, w string) string {
|
func Max(v, w string) string {
|
||||||
v = Canonical(v)
|
v = Canonical(v)
|
||||||
@ -151,7 +151,7 @@ func Max(v, w string) string {
|
|||||||
return w
|
return w
|
||||||
}
|
}
|
||||||
|
|
||||||
// ByVersion implements [sort.Interface] for sorting semantic version strings.
|
// ByVersion implements sort.Interface for sorting semantic version strings.
|
||||||
type ByVersion []string
|
type ByVersion []string
|
||||||
|
|
||||||
func (vs ByVersion) Len() int { return len(vs) }
|
func (vs ByVersion) Len() int { return len(vs) }
|
||||||
@ -164,7 +164,7 @@ func (vs ByVersion) Less(i, j int) bool {
|
|||||||
return vs[i] < vs[j]
|
return vs[i] < vs[j]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort sorts a list of semantic version strings using [ByVersion].
|
// Sort sorts a list of semantic version strings using ByVersion.
|
||||||
func Sort(list []string) {
|
func Sort(list []string) {
|
||||||
sort.Sort(ByVersion(list))
|
sort.Sort(ByVersion(list))
|
||||||
}
|
}
|
||||||
|
6
vendor/golang.org/x/net/http2/pipe.go
generated
vendored
6
vendor/golang.org/x/net/http2/pipe.go
generated
vendored
@ -88,9 +88,13 @@ func (p *pipe) Write(d []byte) (n int, err error) {
|
|||||||
p.c.L = &p.mu
|
p.c.L = &p.mu
|
||||||
}
|
}
|
||||||
defer p.c.Signal()
|
defer p.c.Signal()
|
||||||
if p.err != nil || p.breakErr != nil {
|
if p.err != nil {
|
||||||
return 0, errClosedPipeWrite
|
return 0, errClosedPipeWrite
|
||||||
}
|
}
|
||||||
|
if p.breakErr != nil {
|
||||||
|
p.unread += len(d)
|
||||||
|
return len(d), nil // discard when there is no reader
|
||||||
|
}
|
||||||
return p.b.Write(d)
|
return p.b.Write(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
vendor/golang.org/x/net/http2/server.go
generated
vendored
7
vendor/golang.org/x/net/http2/server.go
generated
vendored
@ -1822,18 +1822,15 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
st.bodyBytes += int64(len(data))
|
|
||||||
wrote, err := st.body.Write(data)
|
wrote, err := st.body.Write(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// The handler has closed the request body.
|
|
||||||
// Return the connection-level flow control for the discarded data,
|
|
||||||
// but not the stream-level flow control.
|
|
||||||
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
|
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
|
||||||
return nil
|
return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
|
||||||
}
|
}
|
||||||
if wrote != len(data) {
|
if wrote != len(data) {
|
||||||
panic("internal error: bad Writer")
|
panic("internal error: bad Writer")
|
||||||
}
|
}
|
||||||
|
st.bodyBytes += int64(len(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return any padded flow control now, since we won't
|
// Return any padded flow control now, since we won't
|
||||||
|
41
vendor/golang.org/x/net/http2/transport.go
generated
vendored
41
vendor/golang.org/x/net/http2/transport.go
generated
vendored
@ -560,11 +560,10 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
|
|||||||
traceGotConn(req, cc, reused)
|
traceGotConn(req, cc, reused)
|
||||||
res, err := cc.RoundTrip(req)
|
res, err := cc.RoundTrip(req)
|
||||||
if err != nil && retry <= 6 {
|
if err != nil && retry <= 6 {
|
||||||
roundTripErr := err
|
|
||||||
if req, err = shouldRetryRequest(req, err); err == nil {
|
if req, err = shouldRetryRequest(req, err); err == nil {
|
||||||
// After the first retry, do exponential backoff with 10% jitter.
|
// After the first retry, do exponential backoff with 10% jitter.
|
||||||
if retry == 0 {
|
if retry == 0 {
|
||||||
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
|
t.vlogf("RoundTrip retrying after failure: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
backoff := float64(uint(1) << (uint(retry) - 1))
|
backoff := float64(uint(1) << (uint(retry) - 1))
|
||||||
@ -573,7 +572,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
|
|||||||
timer := backoffNewTimer(d)
|
timer := backoffNewTimer(d)
|
||||||
select {
|
select {
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
|
t.vlogf("RoundTrip retrying after failure: %v", err)
|
||||||
continue
|
continue
|
||||||
case <-req.Context().Done():
|
case <-req.Context().Done():
|
||||||
timer.Stop()
|
timer.Stop()
|
||||||
@ -1266,27 +1265,6 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelRequest := func(cs *clientStream, err error) error {
|
|
||||||
cs.cc.mu.Lock()
|
|
||||||
defer cs.cc.mu.Unlock()
|
|
||||||
cs.abortStreamLocked(err)
|
|
||||||
if cs.ID != 0 {
|
|
||||||
// This request may have failed because of a problem with the connection,
|
|
||||||
// or for some unrelated reason. (For example, the user might have canceled
|
|
||||||
// the request without waiting for a response.) Mark the connection as
|
|
||||||
// not reusable, since trying to reuse a dead connection is worse than
|
|
||||||
// unnecessarily creating a new one.
|
|
||||||
//
|
|
||||||
// If cs.ID is 0, then the request was never allocated a stream ID and
|
|
||||||
// whatever went wrong was unrelated to the connection. We might have
|
|
||||||
// timed out waiting for a stream slot when StrictMaxConcurrentStreams
|
|
||||||
// is set, for example, in which case retrying on a different connection
|
|
||||||
// will not help.
|
|
||||||
cs.cc.doNotReuse = true
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-cs.respHeaderRecv:
|
case <-cs.respHeaderRecv:
|
||||||
@ -1301,12 +1279,15 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||||||
return handleResponseHeaders()
|
return handleResponseHeaders()
|
||||||
default:
|
default:
|
||||||
waitDone()
|
waitDone()
|
||||||
return nil, cancelRequest(cs, cs.abortErr)
|
return nil, cs.abortErr
|
||||||
}
|
}
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, cancelRequest(cs, ctx.Err())
|
err := ctx.Err()
|
||||||
|
cs.abortStream(err)
|
||||||
|
return nil, err
|
||||||
case <-cs.reqCancel:
|
case <-cs.reqCancel:
|
||||||
return nil, cancelRequest(cs, errRequestCanceled)
|
cs.abortStream(errRequestCanceled)
|
||||||
|
return nil, errRequestCanceled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2574,9 +2555,6 @@ func (b transportResponseBody) Close() error {
|
|||||||
cs := b.cs
|
cs := b.cs
|
||||||
cc := cs.cc
|
cc := cs.cc
|
||||||
|
|
||||||
cs.bufPipe.BreakWithError(errClosedResponseBody)
|
|
||||||
cs.abortStream(errClosedResponseBody)
|
|
||||||
|
|
||||||
unread := cs.bufPipe.Len()
|
unread := cs.bufPipe.Len()
|
||||||
if unread > 0 {
|
if unread > 0 {
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
@ -2595,6 +2573,9 @@ func (b transportResponseBody) Close() error {
|
|||||||
cc.wmu.Unlock()
|
cc.wmu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cs.bufPipe.BreakWithError(errClosedResponseBody)
|
||||||
|
cs.abortStream(errClosedResponseBody)
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-cs.donec:
|
case <-cs.donec:
|
||||||
case <-cs.ctx.Done():
|
case <-cs.ctx.Done():
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd
|
//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd hurd linux netbsd openbsd
|
// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
70
vendor/golang.org/x/sys/unix/ioctl_signed.go
generated
vendored
70
vendor/golang.org/x/sys/unix/ioctl_signed.go
generated
vendored
@ -1,70 +0,0 @@
|
|||||||
// Copyright 2018 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build aix || solaris
|
|
||||||
// +build aix solaris
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ioctl itself should not be exposed directly, but additional get/set
|
|
||||||
// functions for specific types are permissible.
|
|
||||||
|
|
||||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
|
||||||
// on fd, using the specified request number.
|
|
||||||
func IoctlSetInt(fd int, req int, value int) error {
|
|
||||||
return ioctl(fd, req, uintptr(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlSetPointerInt performs an ioctl operation which sets an
|
|
||||||
// integer value on fd, using the specified request number. The ioctl
|
|
||||||
// argument is called with a pointer to the integer value, rather than
|
|
||||||
// passing the integer value directly.
|
|
||||||
func IoctlSetPointerInt(fd int, req int, value int) error {
|
|
||||||
v := int32(value)
|
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(&v))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
|
|
||||||
//
|
|
||||||
// To change fd's window size, the req argument should be TIOCSWINSZ.
|
|
||||||
func IoctlSetWinsize(fd int, req int, value *Winsize) error {
|
|
||||||
// TODO: if we get the chance, remove the req parameter and
|
|
||||||
// hardcode TIOCSWINSZ.
|
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlSetTermios performs an ioctl on fd with a *Termios.
|
|
||||||
//
|
|
||||||
// The req value will usually be TCSETA or TIOCSETA.
|
|
||||||
func IoctlSetTermios(fd int, req int, value *Termios) error {
|
|
||||||
// TODO: if we get the chance, remove the req parameter.
|
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
|
||||||
// from fd, using the specified request number.
|
|
||||||
//
|
|
||||||
// A few ioctl requests use the return value as an output parameter;
|
|
||||||
// for those, IoctlRetInt should be used instead of this function.
|
|
||||||
func IoctlGetInt(fd int, req int) (int, error) {
|
|
||||||
var value int
|
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
|
||||||
return value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
|
|
||||||
var value Winsize
|
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlGetTermios(fd int, req int) (*Termios, error) {
|
|
||||||
var value Termios
|
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
12
vendor/golang.org/x/sys/unix/ioctl_zos.go
generated
vendored
12
vendor/golang.org/x/sys/unix/ioctl_zos.go
generated
vendored
@ -17,14 +17,14 @@ import (
|
|||||||
|
|
||||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||||
// on fd, using the specified request number.
|
// on fd, using the specified request number.
|
||||||
func IoctlSetInt(fd int, req int, value int) error {
|
func IoctlSetInt(fd int, req uint, value int) error {
|
||||||
return ioctl(fd, req, uintptr(value))
|
return ioctl(fd, req, uintptr(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
|
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
|
||||||
//
|
//
|
||||||
// To change fd's window size, the req argument should be TIOCSWINSZ.
|
// To change fd's window size, the req argument should be TIOCSWINSZ.
|
||||||
func IoctlSetWinsize(fd int, req int, value *Winsize) error {
|
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||||
// TODO: if we get the chance, remove the req parameter and
|
// TODO: if we get the chance, remove the req parameter and
|
||||||
// hardcode TIOCSWINSZ.
|
// hardcode TIOCSWINSZ.
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||||
@ -33,7 +33,7 @@ func IoctlSetWinsize(fd int, req int, value *Winsize) error {
|
|||||||
// IoctlSetTermios performs an ioctl on fd with a *Termios.
|
// IoctlSetTermios performs an ioctl on fd with a *Termios.
|
||||||
//
|
//
|
||||||
// The req value is expected to be TCSETS, TCSETSW, or TCSETSF
|
// The req value is expected to be TCSETS, TCSETSW, or TCSETSF
|
||||||
func IoctlSetTermios(fd int, req int, value *Termios) error {
|
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||||
if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
|
if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
@ -47,13 +47,13 @@ func IoctlSetTermios(fd int, req int, value *Termios) error {
|
|||||||
//
|
//
|
||||||
// A few ioctl requests use the return value as an output parameter;
|
// A few ioctl requests use the return value as an output parameter;
|
||||||
// for those, IoctlRetInt should be used instead of this function.
|
// for those, IoctlRetInt should be used instead of this function.
|
||||||
func IoctlGetInt(fd int, req int) (int, error) {
|
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||||
var value int
|
var value int
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
||||||
return value, err
|
return value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
|
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||||
var value Winsize
|
var value Winsize
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
@ -62,7 +62,7 @@ func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
|
|||||||
// IoctlGetTermios performs an ioctl on fd with a *Termios.
|
// IoctlGetTermios performs an ioctl on fd with a *Termios.
|
||||||
//
|
//
|
||||||
// The req value is expected to be TCGETS
|
// The req value is expected to be TCGETS
|
||||||
func IoctlGetTermios(fd int, req int) (*Termios, error) {
|
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||||
var value Termios
|
var value Termios
|
||||||
if req != TCGETS {
|
if req != TCGETS {
|
||||||
return &value, ENOSYS
|
return &value, ENOSYS
|
||||||
|
2
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
2
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
|
|||||||
# Use the Docker-based build system
|
# Use the Docker-based build system
|
||||||
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
||||||
$cmd docker build --tag generate:$GOOS $GOOS
|
$cmd docker build --tag generate:$GOOS $GOOS
|
||||||
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
|
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
11
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
11
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -66,7 +66,6 @@ includes_Darwin='
|
|||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#include <sys/sys_domain.h>
|
#include <sys/sys_domain.h>
|
||||||
@ -204,7 +203,6 @@ struct ltchars {
|
|||||||
#include <sys/timerfd.h>
|
#include <sys/timerfd.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <netinet/udp.h>
|
|
||||||
#include <linux/audit.h>
|
#include <linux/audit.h>
|
||||||
#include <linux/bpf.h>
|
#include <linux/bpf.h>
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
@ -519,11 +517,10 @@ ccflags="$@"
|
|||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
|
||||||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
||||||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
||||||
$2 ~ /^RAW_PAYLOAD_/ ||
|
$2 ~ /^RAW_PAYLOAD_/ ||
|
||||||
$2 ~ /^[US]F_/ ||
|
|
||||||
$2 ~ /^TP_STATUS_/ ||
|
$2 ~ /^TP_STATUS_/ ||
|
||||||
$2 ~ /^FALLOC_/ ||
|
$2 ~ /^FALLOC_/ ||
|
||||||
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
|
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
|
||||||
@ -741,8 +738,7 @@ main(void)
|
|||||||
e = errors[i].num;
|
e = errors[i].num;
|
||||||
if(i > 0 && errors[i-1].num == e)
|
if(i > 0 && errors[i-1].num == e)
|
||||||
continue;
|
continue;
|
||||||
strncpy(buf, strerror(e), sizeof(buf) - 1);
|
strcpy(buf, strerror(e));
|
||||||
buf[sizeof(buf) - 1] = '\0';
|
|
||||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
||||||
buf[0] += a - A;
|
buf[0] += a - A;
|
||||||
@ -761,8 +757,7 @@ main(void)
|
|||||||
e = signals[i].num;
|
e = signals[i].num;
|
||||||
if(i > 0 && signals[i-1].num == e)
|
if(i > 0 && signals[i-1].num == e)
|
||||||
continue;
|
continue;
|
||||||
strncpy(buf, strsignal(e), sizeof(buf) - 1);
|
strcpy(buf, strsignal(e));
|
||||||
buf[sizeof(buf) - 1] = '\0';
|
|
||||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
||||||
buf[0] += a - A;
|
buf[0] += a - A;
|
||||||
|
40
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
40
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
@ -1,40 +0,0 @@
|
|||||||
// Copyright 2023 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux
|
|
||||||
// +build linux
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import "unsafe"
|
|
||||||
|
|
||||||
type mremapMmapper struct {
|
|
||||||
mmapper
|
|
||||||
mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
|
||||||
if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&MREMAP_FIXED != 0 {
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
pOld := &oldData[cap(oldData)-1]
|
|
||||||
m.Lock()
|
|
||||||
defer m.Unlock()
|
|
||||||
bOld := m.active[pOld]
|
|
||||||
if bOld == nil || &bOld[0] != &oldData[0] {
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
newAddr, errno := m.mremap(uintptr(unsafe.Pointer(&bOld[0])), uintptr(len(bOld)), uintptr(newLength), flags, 0)
|
|
||||||
if errno != nil {
|
|
||||||
return nil, errno
|
|
||||||
}
|
|
||||||
bNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength)
|
|
||||||
pNew := &bNew[cap(bNew)-1]
|
|
||||||
if flags&MREMAP_DONTUNMAP == 0 {
|
|
||||||
delete(m.active, pOld)
|
|
||||||
}
|
|
||||||
m.active[pNew] = bNew
|
|
||||||
return bNew, nil
|
|
||||||
}
|
|
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -408,8 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
|
|||||||
|
|
||||||
func (w WaitStatus) TrapCause() int { return -1 }
|
func (w WaitStatus) TrapCause() int { return -1 }
|
||||||
|
|
||||||
//sys ioctl(fd int, req int, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl
|
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = ioctl
|
||||||
|
|
||||||
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
|
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
|
||||||
// There is no way to create a custom fcntl and to keep //sys fcntl easily,
|
// There is no way to create a custom fcntl and to keep //sys fcntl easily,
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
generated
vendored
@ -8,6 +8,7 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
|
||||||
|
|
||||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
generated
vendored
@ -8,6 +8,7 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
|
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
|
||||||
|
|
||||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
|
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
|
||||||
|
3
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
3
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -613,7 +613,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|||||||
//sys Rmdir(path string) (err error)
|
//sys Rmdir(path string) (err error)
|
||||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||||
//sys Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error)
|
|
||||||
//sys Setegid(egid int) (err error)
|
//sys Setegid(egid int) (err error)
|
||||||
//sysnb Seteuid(euid int) (err error)
|
//sysnb Seteuid(euid int) (err error)
|
||||||
//sysnb Setgid(gid int) (err error)
|
//sysnb Setgid(gid int) (err error)
|
||||||
@ -623,6 +622,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|||||||
//sys Setprivexec(flag int) (err error)
|
//sys Setprivexec(flag int) (err error)
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Setuid(uid int) (err error)
|
//sysnb Setuid(uid int) (err error)
|
||||||
@ -676,6 +676,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|||||||
// Kqueue_from_portset_np
|
// Kqueue_from_portset_np
|
||||||
// Kqueue_portset
|
// Kqueue_portset
|
||||||
// Getattrlist
|
// Getattrlist
|
||||||
|
// Setattrlist
|
||||||
// Getdirentriesattr
|
// Getdirentriesattr
|
||||||
// Searchfs
|
// Searchfs
|
||||||
// Delete
|
// Delete
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
@ -326,6 +326,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Setuid(uid int) (err error)
|
//sysnb Setuid(uid int) (err error)
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
@ -433,6 +433,7 @@ func Dup3(oldfd, newfd, flags int) error {
|
|||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Setuid(uid int) (err error)
|
//sysnb Setuid(uid int) (err error)
|
||||||
|
57
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
57
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -1699,23 +1699,12 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
|
|||||||
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
|
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// elfNT_PRSTATUS is a copy of the debug/elf.NT_PRSTATUS constant so
|
|
||||||
// x/sys/unix doesn't need to depend on debug/elf and thus
|
|
||||||
// compress/zlib, debug/dwarf, and other packages.
|
|
||||||
const elfNT_PRSTATUS = 1
|
|
||||||
|
|
||||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||||
var iov Iovec
|
return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
|
||||||
iov.Base = (*byte)(unsafe.Pointer(regsout))
|
|
||||||
iov.SetLen(int(unsafe.Sizeof(*regsout)))
|
|
||||||
return ptracePtr(PTRACE_GETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
|
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
|
||||||
var iov Iovec
|
return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
|
||||||
iov.Base = (*byte)(unsafe.Pointer(regs))
|
|
||||||
iov.SetLen(int(unsafe.Sizeof(*regs)))
|
|
||||||
return ptracePtr(PTRACE_SETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func PtraceSetOptions(pid int, options int) (err error) {
|
func PtraceSetOptions(pid int, options int) (err error) {
|
||||||
@ -1884,6 +1873,7 @@ func Getpgrp() (pid int) {
|
|||||||
//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
|
//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
|
||||||
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
||||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||||
|
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
@ -1897,15 +1887,6 @@ func Getpgrp() (pid int) {
|
|||||||
//sysnb Settimeofday(tv *Timeval) (err error)
|
//sysnb Settimeofday(tv *Timeval) (err error)
|
||||||
//sys Setns(fd int, nstype int) (err error)
|
//sys Setns(fd int, nstype int) (err error)
|
||||||
|
|
||||||
//go:linkname syscall_prlimit syscall.prlimit
|
|
||||||
func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error
|
|
||||||
|
|
||||||
func Prlimit(pid, resource int, newlimit, old *Rlimit) error {
|
|
||||||
// Just call the syscall version, because as of Go 1.21
|
|
||||||
// it will affect starting a new process.
|
|
||||||
return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old))
|
|
||||||
}
|
|
||||||
|
|
||||||
// PrctlRetInt performs a prctl operation specified by option and further
|
// PrctlRetInt performs a prctl operation specified by option and further
|
||||||
// optional arguments arg2 through arg5 depending on option. It returns a
|
// optional arguments arg2 through arg5 depending on option. It returns a
|
||||||
// non-negative integer that is returned by the prctl syscall.
|
// non-negative integer that is returned by the prctl syscall.
|
||||||
@ -2124,15 +2105,11 @@ func writevRacedetect(iovecs []Iovec, n int) {
|
|||||||
|
|
||||||
// mmap varies by architecture; see syscall_linux_*.go.
|
// mmap varies by architecture; see syscall_linux_*.go.
|
||||||
//sys munmap(addr uintptr, length uintptr) (err error)
|
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||||
//sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
|
|
||||||
|
|
||||||
var mapper = &mremapMmapper{
|
var mapper = &mmapper{
|
||||||
mmapper: mmapper{
|
active: make(map[*byte][]byte),
|
||||||
active: make(map[*byte][]byte),
|
mmap: mmap,
|
||||||
mmap: mmap,
|
munmap: munmap,
|
||||||
munmap: munmap,
|
|
||||||
},
|
|
||||||
mremap: mremap,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
|
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
|
||||||
@ -2143,10 +2120,6 @@ func Munmap(b []byte) (err error) {
|
|||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
|
||||||
return mapper.Mremap(oldData, newLength, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys Madvise(b []byte, advice int) (err error)
|
//sys Madvise(b []byte, advice int) (err error)
|
||||||
//sys Mprotect(b []byte, prot int) (err error)
|
//sys Mprotect(b []byte, prot int) (err error)
|
||||||
//sys Mlock(b []byte) (err error)
|
//sys Mlock(b []byte) (err error)
|
||||||
@ -2439,21 +2412,6 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
|
|||||||
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
|
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
|
|
||||||
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
|
|
||||||
|
|
||||||
func Getresuid() (ruid, euid, suid int) {
|
|
||||||
var r, e, s _C_int
|
|
||||||
getresuid(&r, &e, &s)
|
|
||||||
return int(r), int(e), int(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Getresgid() (rgid, egid, sgid int) {
|
|
||||||
var r, e, s _C_int
|
|
||||||
getresgid(&r, &e, &s)
|
|
||||||
return int(r), int(e), int(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
@ -2495,6 +2453,7 @@ func Getresgid() (rgid, egid, sgid int) {
|
|||||||
// MqTimedreceive
|
// MqTimedreceive
|
||||||
// MqTimedsend
|
// MqTimedsend
|
||||||
// MqUnlink
|
// MqUnlink
|
||||||
|
// Mremap
|
||||||
// Msgctl
|
// Msgctl
|
||||||
// Msgget
|
// Msgget
|
||||||
// Msgrcv
|
// Msgrcv
|
||||||
|
27
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
27
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
@ -97,6 +97,33 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
rl := rlimit32{}
|
||||||
|
if rlim.Cur == rlimInf64 {
|
||||||
|
rl.Cur = rlimInf32
|
||||||
|
} else if rlim.Cur < uint64(rlimInf32) {
|
||||||
|
rl.Cur = uint32(rlim.Cur)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
if rlim.Max == rlimInf64 {
|
||||||
|
rl.Max = rlimInf32
|
||||||
|
} else if rlim.Max < uint64(rlimInf32) {
|
||||||
|
rl.Max = uint32(rlim.Max)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return setrlimit(resource, &rl)
|
||||||
|
}
|
||||||
|
|
||||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
newoffset, errno := seek(fd, offset, whence)
|
newoffset, errno := seek(fd, offset, whence)
|
||||||
if errno != 0 {
|
if errno != 0 {
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
@ -46,6 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
|
||||||
|
27
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
27
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
@ -171,6 +171,33 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
rl := rlimit32{}
|
||||||
|
if rlim.Cur == rlimInf64 {
|
||||||
|
rl.Cur = rlimInf32
|
||||||
|
} else if rlim.Cur < uint64(rlimInf32) {
|
||||||
|
rl.Cur = uint32(rlim.Cur)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
if rlim.Max == rlimInf64 {
|
||||||
|
rl.Max = rlimInf32
|
||||||
|
} else if rlim.Max < uint64(rlimInf32) {
|
||||||
|
rl.Max = uint32(rlim.Max)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return setrlimit(resource, &rl)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
|
func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
|
||||||
|
10
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
10
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -39,6 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
|
||||||
@ -142,6 +143,15 @@ func Getrlimit(resource int, rlim *Rlimit) error {
|
|||||||
return getrlimit(resource, rlim)
|
return getrlimit(resource, rlim)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
err := Prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return setrlimit(resource, rlim)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||||
|
5
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
5
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
@ -126,6 +126,11 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
|
func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
|
||||||
if tv == nil {
|
if tv == nil {
|
||||||
return utimensat(dirfd, path, nil, 0)
|
return utimensat(dirfd, path, nil, 0)
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@ -37,6 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||||
|
27
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
27
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
@ -151,6 +151,33 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
rl := rlimit32{}
|
||||||
|
if rlim.Cur == rlimInf64 {
|
||||||
|
rl.Cur = rlimInf32
|
||||||
|
} else if rlim.Cur < uint64(rlimInf32) {
|
||||||
|
rl.Cur = uint32(rlim.Cur)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
if rlim.Max == rlimInf64 {
|
||||||
|
rl.Max = rlimInf32
|
||||||
|
} else if rlim.Max < uint64(rlimInf32) {
|
||||||
|
rl.Max = uint32(rlim.Max)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return setrlimit(resource, &rl)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Epc }
|
func (r *PtraceRegs) PC() uint64 { return r.Epc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
|
||||||
|
27
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
27
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
generated
vendored
@ -159,6 +159,33 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
|
err = Prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
rl := rlimit32{}
|
||||||
|
if rlim.Cur == rlimInf64 {
|
||||||
|
rl.Cur = rlimInf32
|
||||||
|
} else if rlim.Cur < uint64(rlimInf32) {
|
||||||
|
rl.Cur = uint32(rlim.Cur)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
if rlim.Max == rlimInf64 {
|
||||||
|
rl.Max = rlimInf32
|
||||||
|
} else if rlim.Max < uint64(rlimInf32) {
|
||||||
|
rl.Max = uint32(rlim.Max)
|
||||||
|
} else {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
return setrlimit(resource, &rl)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint32 { return r.Nip }
|
func (r *PtraceRegs) PC() uint32 { return r.Nip }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
|
func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
@ -34,6 +34,7 @@ package unix
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
//sys Stat(path string, stat *Stat_t) (err error)
|
//sys Stat(path string, stat *Stat_t) (err error)
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -38,6 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
@ -34,6 +34,7 @@ import (
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
//sys Stat(path string, stat *Stat_t) (err error)
|
//sys Stat(path string, stat *Stat_t) (err error)
|
||||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@ -31,6 +31,7 @@ package unix
|
|||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
//sys setfsgid(gid int) (prev int, err error)
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
//sys setfsuid(uid int) (prev int, err error)
|
||||||
|
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
//sys Stat(path string, stat *Stat_t) (err error)
|
//sys Stat(path string, stat *Stat_t) (err error)
|
||||||
|
2
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
@ -340,6 +340,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
|||||||
//sys Setpriority(which int, who int, prio int) (err error)
|
//sys Setpriority(which int, who int, prio int) (err error)
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Setuid(uid int) (err error)
|
//sysnb Setuid(uid int) (err error)
|
||||||
@ -500,6 +501,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
|||||||
// compat_43_osendmsg
|
// compat_43_osendmsg
|
||||||
// compat_43_osethostid
|
// compat_43_osethostid
|
||||||
// compat_43_osethostname
|
// compat_43_osethostname
|
||||||
|
// compat_43_osetrlimit
|
||||||
// compat_43_osigblock
|
// compat_43_osigblock
|
||||||
// compat_43_osigsetmask
|
// compat_43_osigsetmask
|
||||||
// compat_43_osigstack
|
// compat_43_osigstack
|
||||||
|
18
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
18
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@ -151,21 +151,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
|
|
||||||
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
|
|
||||||
|
|
||||||
func Getresuid() (ruid, euid, suid int) {
|
|
||||||
var r, e, s _C_int
|
|
||||||
getresuid(&r, &e, &s)
|
|
||||||
return int(r), int(e), int(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Getresgid() (rgid, egid, sgid int) {
|
|
||||||
var r, e, s _C_int
|
|
||||||
getresgid(&r, &e, &s)
|
|
||||||
return int(r), int(e), int(s)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
|
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
|
||||||
|
|
||||||
@ -309,6 +294,7 @@ func Uname(uname *Utsname) error {
|
|||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setrtable(rtable int) (err error)
|
//sysnb Setrtable(rtable int) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||||
@ -353,6 +339,8 @@ func Uname(uname *Utsname) error {
|
|||||||
// getgid
|
// getgid
|
||||||
// getitimer
|
// getitimer
|
||||||
// getlogin
|
// getlogin
|
||||||
|
// getresgid
|
||||||
|
// getresuid
|
||||||
// getthrid
|
// getthrid
|
||||||
// ktrace
|
// ktrace
|
||||||
// lfs_bmapv
|
// lfs_bmapv
|
||||||
|
21
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
21
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -545,24 +545,24 @@ func Minor(dev uint64) uint32 {
|
|||||||
* Expose the ioctl function
|
* Expose the ioctl function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//sys ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl
|
//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
|
||||||
//sys ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
|
//sys ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
|
||||||
|
|
||||||
func ioctl(fd int, req int, arg uintptr) (err error) {
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||||
_, err = ioctlRet(fd, req, arg)
|
_, err = ioctlRet(fd, req, arg)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
|
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||||
_, err = ioctlPtrRet(fd, req, arg)
|
_, err = ioctlPtrRet(fd, req, arg)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetTermio(fd int, req int, value *Termio) error {
|
func IoctlSetTermio(fd int, req uint, value *Termio) error {
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlGetTermio(fd int, req int) (*Termio, error) {
|
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
|
||||||
var value Termio
|
var value Termio
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
||||||
return &value, err
|
return &value, err
|
||||||
@ -665,6 +665,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||||||
//sys Setpriority(which int, who int, prio int) (err error)
|
//sys Setpriority(which int, who int, prio int) (err error)
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
|
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Setsid() (pid int, err error)
|
//sysnb Setsid() (pid int, err error)
|
||||||
//sysnb Setuid(uid int) (err error)
|
//sysnb Setuid(uid int) (err error)
|
||||||
//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
|
//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
|
||||||
@ -1079,11 +1080,11 @@ func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags
|
|||||||
return retCl, retData, flags, nil
|
return retCl, retData, flags, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) {
|
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
||||||
return ioctlRet(fd, req, uintptr(arg))
|
return ioctlRet(fd, req, uintptr(arg))
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetString(fd int, req int, val string) error {
|
func IoctlSetString(fd int, req uint, val string) error {
|
||||||
bs := make([]byte, len(val)+1)
|
bs := make([]byte, len(val)+1)
|
||||||
copy(bs[:len(bs)-1], val)
|
copy(bs[:len(bs)-1], val)
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
|
err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
|
||||||
@ -1119,7 +1120,7 @@ func (l *Lifreq) GetLifruUint() uint {
|
|||||||
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlLifreq(fd int, req int, l *Lifreq) error {
|
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(l))
|
return ioctlPtr(fd, req, unsafe.Pointer(l))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1130,6 +1131,6 @@ func (s *Strioctl) SetInt(i int) {
|
|||||||
s.Dp = (*int8)(unsafe.Pointer(&i))
|
s.Dp = (*int8)(unsafe.Pointer(&i))
|
||||||
}
|
}
|
||||||
|
|
||||||
func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
|
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
||||||
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
|
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user