mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#691)
bumping golang.org/x/mod 9b9b3d8...86c51ed: > 86c51ed all: remove golang.org/x/xerrors dependency > 41445a1 zip: update TestUnzipSizeLimitsSpecial for CL 366854 > 145421b all: gofmt > 605edab sumdb/note: relax prescriptiveness of key hash format > a410e2d sumdb/note: catch a Verifiers that returns the wrong Verifier bumping knative.dev/pkg 158538c...714b763: > 714b763 upgrade to latest dependencies (# 2609) > 21d3b47 upgrade to latest dependencies (# 2608) > 8178c38 update k8s to 1.25.2 (# 2599) > fb2e4fb Preserve webhook namespaceSelector.matchLabels (# 2605) > 5c5da28 Update actions (# 2607) > 1fb3e67 Update community files (# 2606) > bc93b0a bump min kubernetes to v1.23 (# 2595) > 8cacac2 upgrade to latest dependencies (# 2604) bumping github.com/go-logr/logr 99e02a9...47e013c: > 47e013c Merge pull request # 128 from thockin/format-test > b359493 Merge pull request # 140 from thockin/testing_testr > d731630 Add some test cases > 28755ae Merge pull request # 130 from thockin/nil-stringer > 5377a98 Move testing -> testr, deprecate, alias old names > 4610455 Reformat existing test cases > ec7c16c Merge pull request # 135 from thockin/fix-actions-go-versions > 945d619 funcr: Handle panic in Stringer, Marshaler, error > e2fd555 Merge pull request # 133 from pohly/nil-logger > e438a74 Fix GH actions for Go versions, drop 1.14 > af7b868 Add stringer, error, marshaler to benchmark > eb02c45 Merge pull request # 129 from tonglil/patch-1 > 68ef51c docs: describe handling of optional logger parameters > 8aa3af1 Update README.md bumping k8s.io/kube-openapi 3ee0da9...67bda5d: > 67bda5d Merge pull request # 308 from alexzielenski/fieldlevelannotation > 011e075 Merge pull request # 302 from ruquanzhao/branch2 > 4d09b3c add field level override integration test for openapi gen > c39d0f6 Merge pull request # 306 from apelisse/go-1.18 > dff3465 Remove newlineReporter custom report > 74b52a2 update smd to 4.2.3 > 1062c7a Merge pull request # 304 from dims/switch-to-released-version-of-v3.8.0-github.com/emicklei/go-restful/v3 > 0bed9f0 Update to go1.18 > 89ff079 upgrade ginkgo to ginkgo/v2 > 48d47d9 remove unused function > 31174f5 Merge pull request # 303 from dims/move-to-newer-v3-version-of-go-restful > 77c5a1e Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3 > bff9878 add ability to override structType with field-level annotation > 5e7f5fd Merge pull request # 300 from Jefftree/remove-bazel-references > ca8f27e Move to newer version (v3) of github.com/emicklei/go-restful > b28bf28 Merge pull request # 283 from alexzielenski/gnostic_conversion > fa41ef1 Remove bazel references > c715a76 add direct conversion for gnostic v2 types bumping sigs.k8s.io/json 9f7c6b3...f223a00: > f223a00 Merge pull request # 16 from kevindelgado/strict-error-path-separation > ff3dbbe Merge pull request # 14 from liggitt/go118 > b536e95 store err type and path separately in strict errors > 227cbc7 Merge pull request # 15 from liggitt/ci-refresh-go > 4017094 sync go1.18 changes from encoding/json > 93e9748 Check latest go version in CI bumping sigs.k8s.io/structured-merge-diff/v4 65611e5...26781d0: > 26781d0 Merge pull request # 224 from apelisse/revert-backwards-incompatible-changes > 4ad28cc Merge pull request # 223 from apelisse/v5 > 4d3633c Remove all copies of Schema and Map > ebd569f Merge pull request # 220 from alexzielenski/fieldannotation > 1754a8d Create package v5 for backward incompatible change > b4e893e Revert "use pointer semantics for schema" > 5e8be97 Merge pull request # 222 from alexzielenski/fix-exponential-bug > c779eba fix gofmt > a70144b Revert "Create package v5 for backward incompatible change" > 8f72076 Merge pull request # 221 from apelisse/improve-operations-parsing > 478fc28 fix nil schema type not being deduced to whatever the other operand is > 50567d1 update gofmt > e3fbe42 Merge pull request # 204 from zqzten/retry_add_back_owned > 11d9bfa Change operation test dependency on parseableType rather than typename > 0f66c33 Add exponential test failure for large CR > 15f722a add benchmark excercising field-level overrides > 0f3c884 Merge pull request # 215 from alexzielenski/schema-copy > 41d6b2c add test for multiple version appliers with reliant fields conversions > 8a2620f Name operation tests after their filename > 60b3b65 use pointer semantics for schema > 73412af Merge pull request # 213 from apelisse/add-readme-testdata > f345637 fixup! add CopyInto method to schema.Schema > 5e01923 add back owned items at pruned version first > 00b6b52 add field-level element relationship which overrides referred type > aa301db Merge pull request # 214 from apelisse/update-jsoniter-go118 > f0fadd0 Add README to explain how schemas can be generated > c26273c add CopyInto method to schema.Schema > b2bdf68 Update jsoniter to v1.1.12 to work with go1.18 bumping github.com/imdario/mergo 9316a62...9f23e2d: > 9f23e2d Update README.md > 7816d7f Merge pull request # 86 from vdemeester/append-slice-without-pancking > 9a471d7 Appending slice can cause Mergo to panic… bumping k8s.io/api 44d27eb...4b838ea: > 4b838ea Update dependencies to v0.25.2 tag > fce3016 Merge pull request # 112161 from pohly/automated-cherry-pick-of-# 112129-origin-release-1.25 > 29513a2 dependencies: update to ginkgo v2.1.6 and gomega v1.20.1 > 5c4a1b1 Merge remote-tracking branch 'origin/master' into release-1.25 > 714e431 Merge pull request # 111657 from aojea/hc_nodeport > 8608211 Merge pull request # 109090 from sarveshr7/multicidr-rangeallocator > 7840548 doc services healthcheckNodePort is inmutable > b88698c Merge pull request # 111258 from dobsonj/kep-596-ga-feature-flag > a7621fb Auto generate code for ClusterCIDR API > 2f9e588 Merge pull request # 111113 from mimowo/retriable-pod-failures-job-controller > b964bc7 Move CSIInlineVolume feature to GA > 14e048f Introduce networking/v1alpha1 api, ClusterCIDR type > 3be517c Merge pull request # 111696 from liggitt/go119mod > fe83bea Support handling of pod failures with respect to the specified rules > 991b481 Merge pull request # 108692 from jsafrane/selinux > e281bde Update go.mod to go1.19 > f42f86a Regenerate files > a39f97c Add CSIDriverSpec.SELinuxMount > c8f0601 Merge pull request # 111677 from dims/stop-panic-in-govet-levee > ea1451a run lint-dependencies and follow directions > a2b9bcc Stop panic in govet-levee CI job > ad89a10 Merge pull request # 110495 from alexzielenski/atomic-objectreference > e590d1f Merge pull request # 111090 from kinvolk/rata/userns-support-2022 > d978b18 mark persistentvolume's claimRef as granular > 7488a8c Merge pull request # 111435 from soltysh/cronjob_timezone_beta > 2a31718 Update autogenerated files > d351ecd Merge pull request # 111557 from alexzielenski/update-smd-422 > f990455 Update generated > 9448de2 pkg/apis, staging: add HostUsers to pod spec > ae37896 update smd to 4.2.3 > 010c740 Promote CronJobTimeZone to beta > 1b82208 Merge pull request # 110959 from mimowo/retriable-pod-failures-pod-conditions > 08dedd8 Introduction of a pod condition type indicating disruption. Its `reason` field indicates the reason: > f5e1938 Merge pull request # 111587 from ialidzhikov/k8s-utils@ee6ede2d64 > b3c30ab Update `k8s.io/utils` to `ee6ede2d64ed` > be740eb Merge pull request # 111441 from denkensk/respect-topology > a76179a Merge pull request # 111402 from verb/111030-ec-ga > acf399c code generated by script for MatchLabelKeys in TopologySpreadConstraint > 537ea12 Merge pull request # 111442 from ialidzhikov/k8s-utils@56c0de1e6f > d8280df Remove EphemeralContainers beta disclaimer > d96a10b api defination for MatchLabelKeys in TopologySpreadConstraint > 8f210eb Update `k8s.io/utils` to `9bab9ef40391` > 04aced3 Merge pull request # 111254 from dims/update-to-golang-1.19-rc2 > dda4dee Generate and format files > f6f0d0e Merge pull request # 111194 from ravisantoshgudimetla/promote-maxSurge-ga > f77fa25 Merge pull request # 111229 from ravisantoshgudimetla/promote-podOS-GA > 7b89ea1 Generated: maxSurge for DS > 9a18f7a Merge pull request # 110178 from kevindelgado/validation-beta-1-25 > 844753e Generated: PodOS field to GA > d895ab7 api: Promote DS maxSurge to GA > 096c9df Merge pull request # 110388 from sanposhiho/graduate-mindomain-beta > 1d3dcfc update kjson > bdc8eb0 api: Promote PodOS field to GA > fa32a3a Merge pull request # 110896 from ravisantoshgudimetla/promote-minReadySec-sts-update-ga > eeea400 Update doc comment > 08c75a7 Merge pull request # 111008 from cici37/bumpCEL > 40e8eea Generated: minReadySeconds for STS > 0110f55 Update v1 package to graduate minDomains to beta > 0c6d49d Bump cel-go to v0.12.0 > df27ddf api: Promote statefulset MinReadySeconds to GA > b9bd732 Merge pull request # 110564 from j4m3s-s/add-ports-doc-fix > 51e4c4a Merge pull request # 111010 from thockin/remove-refs-to-EndpointSliceNodeName > b7c39ad Fix description of Ports in PodSpec > 248dcdb Merge pull request # 111001 from pohly/klog-update > 4756865 Remove obsolete refs to gate EndpointSliceNodeName > b5b8fba build: update to klog v2.70.1 > 8488949 Merge pull request # 110990 from thockin/svc-typenames-IPFamilyPolicyType > ed77e2e Rename IPFamilyPolicyType => IPFamilyPolicy > 33ab20e Merge pull request # 110868 from rikatz/endport-to-ga > f18d381 Merge pull request # 110831 from chendave/openapi > 270b22d Generated files for endPort promotion > 724b071 Bump `kube-openapi` to the latest > e803bc1 Promote endPort to GA > b98f264 Merge pull request # 110724 from pohly/klog-update > 61fcc0f build: update to klog v2.70.0 > edebc67 Merge pull request # 110561 from Shubham82/extend_Description > 60387f6 Merge pull request # 110378 from lucacome/bump-grpc > 1cba8e4 RBAC: Modify the Description for the apiGroup. > 89ed2a8 Bump grpc to v1.47.0 > 6b0201d Merge pull request # 110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1 > 2c10714 Update gopkg.in/yaml.v3 to v3.0.1 > d50b1bc Merge pull request # 109293 from iamNoah1/improve-ingressclassname-api-doc > 832b1f4 Merge pull request # 109938 from dims/move-from-k8s.gcr.io-to-registry.k8s.io > bba462c generate ressources after change request > ed22bb3 Move from k8s.gcr.io to registry.k8s.io > d1f2717 add change requests > be84346 Merge pull request # 109968 from kerthcet/feature/optimize-apifield-comment > e85f85a generate ressources after change request > 209903b amend comment of NodeInclusionPolicy > bac3ee2 add change requests > ae35a85 Merge pull request # 108492 from kerthcet/feature/add-NodeInclustionPolicies > a3f4ca9 generate ressources after change request > 202371b feat: add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec > 4e39c88 add change requests > 9b88471 Merge pull request # 109891 from pohly/log-dependency-update > af2d87a add generated assets > 548c53c Merge pull request # 109602 from lavalamp/remove-clustername > 0f669be dependencies: logr and zapr v1.2.3 > 4b894ff first shot improving api doc for ingressclassname > 5e2f5ad Merge pull request # 109308 from danwinship/traffic-policy-docs > eb567e7 compat > a2ee8c7 Merge pull request # 109803 from liggitt/api-fixture-data > 85c4c9d Clarify ExternalTrafficPolicy/InternalTrafficPolicy definitions > fcb6509 Merge pull request # 109440 from liggitt/gomod-1.18 > 1afa1ae Remove v1.22.0 API fixture data > 3f52c1d Regenerate vendor > a2ae4d4 Add v1.24.0 fixture data > d672b36 Merge pull request # 109506 from wangrzneu/fix-comment > f2f8c15 Merge pull request # 109421 from vpnachev/fix/typo-in-token-request-doc-string > 35e4518 fix IngressClassParametersReferenceScopeCluster comment in staging/src/k8s.io/api/networking > af4f75e Merge pull request # 105963 from zhucan/bugfix-95367 > aed3ebb Fix typo in TokenRequest doc string > 7a89730 Merge pull request # 109436 from JamesLaverack/revert-108290 > 56fb9f0 generated code and doc > 1f82dd7 Revert "Introduce APIs to support multiple ClusterCIDRs (# 108290)" > 6f81c7b csi: add nodeExpandSecret support for CSI client bumping knative.dev/hack 92a65f1...3fdc50b: > 3fdc50b Remove Signing Feature Gate (# 236) > 2d67db5 generate provenances (# 237) > 52a87e1 Update community files (# 235) bumping golang.org/x/tools 897bd77...b3b5c13: > b3b5c13 internal/lsp/cache: invalidate packages with missing deps when files are > 39a4e36 internal/lsp/regtest: only run /default tests with -short > f157068 internal/lsp/regtest: allow sharing memoized results across regtests > 8ccb25c internal/lsp: treat struct tags as string type > 6c8a6c4 internal/lsp: suppress parameter hint when argument matches parameter > c83f42d internal/lsp: update inlay hints documentation to include go snippets > 8b47d4e all: update dependencies > 7600454 gopls: update dependencies > 2a6393f internal/lsp: Refactor to share logic with rename > 4375b29 cmd/auth/cookieauth: delete unreachable os.Exit > 005c07a gopls/internal/vulncheck: adjust logging > 04bd087 internal/lsp: enable fillstruct for generics > 6ec939a internal/span: fix incorrect bounds check in ToOffset > 178fdf9 gopls/internal/regtest: unskip Test_Issue38211 > 1cfe623 gopls/internal/regtest: unskip TestQuickFixEmptyFiles > 3d474c8 internal/lsp/diff: new diff implementation to replace go-diff > a2a2477 gopls/internal/regtest: externalize shouldLoad tracking > 7b605f4 gopls/internal/vulncheck: pass go version to vulncheck config > 126ef8f gopls/internal/govulncheck: sync x/vuln@b9a3ad9 > a732e45 gopls: update golang.org/x/vuln > 980cbfe A+C: delete AUTHORS and CONTRIBUTORS > ec1f924 internal/lsp: add check for nil results to fillreturns > 79f3242 godoc: support go1.19 doc comment syntax > 2957e9d go/callgraph/vta: use types.IsInterface instead of our own isInterface > 2eaea86 go/callgraph/vta: do not include interface types during propagation > dc45e74 internal/lsp: Update FilterDisallow to support matching directories at arbitrary depth. > ce6ce76 internal/lsp/regtest: increase the time allowed for shutdown > 32129bf go/internal/gcimporter: adjust importer to match compiler importer > 22d1494 internal/gcimporter: add support for reading unified IR export data > c3af7c2 internal/lsp/cache: delete workspacePackageHandles (dead code) > 1a4e02f internal/lsp/analysis/unusedvariable: add analyzer > db8f89b internal/memoize: rename Handle to Promise > a7c53b5 internal/analysisinternal: move FindBestMatch to internal/lsp/fuzzy > 9b6c018 internal/lsp/cache: don't trim unexported struct fields > 85173cc internal/lsp/cache: follow usual structure for packages, analysis maps > b2eae76 internal/lsp/cache: simplify modwhy cache > dcb576d internal/lsp/cache: simplify modtidy > b230791 internal/lsp/cache: move PosTo{Decl,Field} out of cache > 8730184 internal/lsp/fake: retry spurious file lock errors on windows > 459e2b8 internal/lsp/progress: actually close over Context in WorkDoneWriter > 7c06b01 go/callgraph/vta: remove interprocedural flows for receiver objects > 6e6f313 internal/lsp/regtest: simplify, consolidate, and document settings > 3db2cdc internal/lsp: wait for ongoing work to complete during server shutdown > a5adb0f internal/lsp/cache: use mod=readonly for process env funcs > a79ee0f Revert "Revert "internal/lsp/cache: don't pin a snapshot to view.importsState" > bc957ec internal/lsp/source: use token.File-agnostic positions to dedupe refs > b6e4951 Revert "internal/lsp/cache: don't pin a snapshot to view.importsState" > 71dc5e2 internal/lsp/cache: make snapshot reference counting uniform > 42457a5 internal/lsp/cache: don't pin a snapshot to view.importsState > d6c099e internal/memoize: document stateIdle, RefCounted > 53ead67 internal/memoize: delete Generation and Bind > 8746177 internal/lsp/cache: simplify ParseGo > 9c2a556 internal/lsp/cache: fail addPackageHandle if metadata is stale > 1dfab61 internal/lsp/cache: use GetHandle not Bind for 5 URI-keyed maps > 2aef121 internal/lsp: consolidate .go/go.mod link logic > 8184d1f internal/lsp/cache: use GetHandle not Bind in astCacheData > 36430f4 internal/lsp/cache: use GetHandle not Bind for actions > b929f3b internal/span: make NewRange accept File, not FileSet > d69bac6 internal/lsp/cache: cache isActiveLocked calculation across snapshots > afa4a95 internal/lsp/cache: persist known subdirs > 698251a internal/lsp/cache: sort Metadata.Deps, for determinism > f79f3aa internal/lsp/cache: clarify buildPackageHandle > e92a18f internal/lsp/lsppos: reduce allocations in NewMapper > f487f36 internal/lsp/source: reduce allocation in workspace-symbols > 7b04e8b internal/persistent: no-op deletion from map does not allocate > f042799 internal/memoize: delete Bind(cleanup) hook > bec0cf1 internal/lsp/cache: avoid Handle mechanism for workspace dir > ffc70b9 lsp/completion: fix ranking of *types.PkgName candidates > 93bf1fc gopls: add range over channel postfix completion > 79fefdf internal/memoize: do not iterate all handles on generation destruction > fa4babc internal/lsp/cache: use persistent map for storing packages in the snapshot > 9358add internal/lsp/cache: remove unused function > c77473f gopls: upgrade staticcheck to v0.3.2 > e8e5b37 internal/lsp/cache: don't construct a new metadata graph if no changes > 8314b7a go/analysis: add suggested fix for unkeyed composite literals > 8865782 internal/lsp: add text edits for unkeyed literals > 1a196f0 internal/lsp/cache: don't build symbol info for non-Go files > b84d509 gopls/doc: regenerate documentation > c10541a go/analysis/passes/fieldalignment: document "false sharing" > 7743d1d internal/lsp: respect range for inlay hints > 0248714 internal/lsp: add additional instrumentation around package loading > e5b3324 internal/lsp: add InlayHint regtests > 2a90056 go/gcexportdata: fix Find for Go modules > 7404bd2 all: gofmt some recent file changes > ec0831a refactor/satisfy: don't crash on type parameters > 66bbba3 internal/memoize: remove unused Store.generations map > 56116ec internal/memoize: don't destroy reference counted handles > 10494c7 cmd/digraph: fix typo > 93a03c2 internal/lsp/cache: invalidate reverse closure when loading packages > c36379b internal/lsp/cache: don't set new metadata if existing is valid > e1ec1f3 internal/imports: use a module resolver if GOWORK is set > 60ca636 internal/lsp: use camel case for inlay hint config fields > 2994e99 internal/persistent: change map to use set/get as method names > 22ab253 internal/lsp: rename viewport to range > 3f5f798 internal/lsp/cache: use persistent map for storing files in the snapshot > f60e9bc internal/lsp/cache: use persistent map for storing gofiles in the snapshot > 871637b internal/lsp: add settings for inlay hints and enable > a44cc76 cmd/stringer: use explicit NeedX values instead of deprecated LoadSyntax > 4e231cb internal/lsp/cache: don't prune unreachable metadata on clone > a2de635 internal/lsp/cache: honor the go.work for computing workspace packages > cbb8e8e internal/span: optimise URI.Filename to avoid allocation > 63d8015 internal/lsp/cache: minor simplifications to Symbols > 59bd4fa internal/lsp: find references to package > a1303c8 internal/lsp: remove tooltip from inlay hints > 641b30b internal/lsp: add inlay hints for inferred type params > 70ccf57 go/packages: fix loading single file when outside of GOPATH, module > 381ac87 internal/lsp/debug: reduce critical sections in trace > 1e14d99 internal/lsp: add inlay hints for composite literal types > e987015 internal/lsp/cache: symbolize in parallel > 88325aa internal/memoize: add trace region for Handle.run > c353b05 internal/lsp/cache: delete checkSnapshotLocked > 567c98b internal/lsp/cache: don't walk URIs to invalidate metadata > dffd645 internal/lsp/cache: only clone metadata if something changed > 4ba3d22 internal/lsp/cache: clone the metadata graph when clearing ShouldLoad > 39d3d49 internal/lsp/cache: use metadataGraph.Clone in snapshot.clone > 8a92078 internal/lsp/cache: build a new metadata graph on load > 9f38ef7 internal/lsp/cache: derive workspace packages from metadata > 041035c Revert "internal/lsp/cache: reduce critical sections" > d097bc9 gopls/internal/vulncheck: include nonaffecting vulnerability info > e8b9ff1 gopls/internal/govulncheck: sync x/vuln@4eb5ba4 > 654a14b internal/lsp/cache: reduce critical sections > 27db7f4 gopls: update golang.org/x/vuln to latest @4eb5ba4 > c993be6 go/analysis/internal/checker: log codeFact error, remove unused action.inputs > ed27611 internal/lsp/cache: cache known subdirs pattern > ebc084a internal/lsp: add inlay hints count to test summary > c15c045 internal/lsp: enable inlay hint tests > 0343989 internal/lsp: fix error message for inlay hints > a41fc98 internal/lsp/cache: use [256]byte Hash instead of hex digit string > c41ddce internal/lsp: include padding in inlay hint marker tests > 5e48d26 internal/lsp: add inlay hints for composite literal names > 83b0675 internal/lsp: add inlay hints for constant values > ecc1479 internal/lsp: add inlay hints for variable types > 65c0181 internal/lsp: support textDocument/inlayHint for parameter names > 9651276 internal/lsp/cache: optimize Snapshot.clone > 697795d internal/lsp/regtest: don't run the connection on the test context > ad756c7 internal/lsp: initial test set up for inlay hints > 1d19788 internal/lsp/cache: always compute IsIntermediateTestVariant > 4a8620f internal/lsp/cache: move metadata fields to a new metadataGraph type > a3d129c internal/lsp/cache: extract module load errors when go.work is used > 6bfd3a4 Revert "internal: temporarily disable tests so we can land CL 410955" > 5ca4cc8 internal: temporarily disable tests so we can land CL 410955 > 63dfc2d internal/lsp/cache: two minor optimizations > 030812f internal: remove unneeded FileSets > 2417911 go/analysis/internal/checker: add -test flag for single/multi-checkers > 43cce67 go/analysis: document need for deterministic Fact encoding > af82757 cmd/callgraph: add test of -algo=vta > 76325da internal/lsp/progress: detach context for all progress notifications > b2fbc38 cmd/callgraph: add -algo=vta option > d68628a go/ast/astutil: clarify PathEnclosingInterval > 3dd056a internal/lsp/mod: fix broken assumptions about file base > 0cdf4b5 internal/lsp/source: eliminate ColumnMapper.PointSpan in favor of Pos > 9d7bf95 internal/lsp: factor out column mapper construction from content > 9e1d19b internal/span: eliminate TokenConverter > dae3f4b internal/lsp/diff: remove unused TokenConverter parameters > de3ef4a internal/lsp/source: remove workaround for newline terminated files > 6b760fc internal/lsp/source: remove ineffectual memoization in MappedRange > ea60815 internal/lsp: use the correct converter for mapped range offsets > 1ff52e2 gopls/internal/vulncheck: use internal/govulncheck > 2bb78cf internal/lsp: add missing bug reporting, and panic during marker tests > 0e859af go/analysis/analysistest: use listed mode instead of deprecated const > f385733 internal/gocommand: skip ill-formed env vars in cmdDebugStr > ccb1050 internal/lsp/cache: invalidate metadata when parsing issues resolve > 904e24e go/ssa: tweak Function.Name() for generic instantiations > 4dd2c74 internal/govulncheck: copy from x/vuln repo > b62b00f internal/lsp: add an option to get notified of bug reports > 960b4ce internal/typeparams: adds core type implementation > b55ed5e internal/lsp/regtest: only print RPC logs if asked > 44db4eb gopls/internal/regtests: add a test for bad go.work files > f97a804 go/analysis/passes/nilness: fixed slice not being considered as non-nil > 13bcb69 internal/lsp/analysis/stubmethods: recognize *ast.CallExpr > facb0d3 internal/span: eliminate Converter and FileConverter > 814e0d7 go/gcexportdata: don't assume that fmt names never change > 1e55371 go/ssa: fix *SelectorExpr within *IndexExpr handling > 29d48d6 go/callgraph/rta: adds tests for (instantiated) generics > ed968f6 internal/lsp/bug: add a package for bug reporting > 090b14e internal/lsp/regtest: make TestResolveImportCycle robust to error order > 820e093 go/types/objectpath: implement fast path for concrete methods > cfd9905 go/ssa: inline *ssa.selection methods > 304195c go/ssa: create *ssa.selection. > f918e87 gopls/internal/vulncheck: copy logic of govulncheck -html > a518b79 gopls/internal/vulncheck: synchronize cache access > ad497c6 internal/lsp/cmd: add -config option to gopls vulncheck > 62d837c go/analysis/passes/httpresponse: minor clarification > 6eb3de2 internal/lsp/analysis: fix a doc comment typo > 728485f gopls/internal/regtest: add a test for using staticcheck with generics > 1a5eed3 cmd/compilebench: use -p, handle packages with asm files > 93852cb internal/lsp: fix source.CompareDiagnostic asymmetry > 8ec40b5 x/tools/go/ssa: instantiate sel.Recv() on MethodVal. > 28c754d internal/lsp/analysis: analyzer for //go:embed directive > 033cbfc internal/typeparams: run go generate with go1.18.2 > bc0e26e internal/typeparams: remove examples in favor of x/exp/typeparams > b87ceec go/analysis/passes/httpresponse: inspect enclosing context of resp, err > 313af96 go/ast/astutil: make Apply follow TypeParams fields > d303668 internal/lsp/cache: use cached parsed files for symbols, if available > 0fb1abf internal/lsp: factor out go/token wrapper into a safetoken package > cde25b3 internal/lsp/lsppos: add helpers for mapping token positions > 22b7096 internal/lsp/cmd: change vulncheck to directly call the hook > 72a884b gopls: update golang.org/x/vuln dependency > d7e01c0 internal/lsp/source/completion: use typeutil.Map for short-circuiting > d299b94 passes/copylock: suppress reports on Offsetof and Alignof > 30fbd19 internal/lsp: fix fillstruct for structs with unsafe.Pointer > 0ebacc1 internal: remove pre-go1.12 conditionally compiled files > 45c8a71 internal/tool: implement structured help command > d27d783 cmd/godoc: expand skips in TestWeb > 4911e4a internal/testenv: remove darwin/arm case from NeedsGoBuild > 54c7ba5 go/analysis/passes/asmdecl: add build tag for loong64 > b4c4500 README: restructure and update > 556c550 internal/lsp/cache: invalidate packages that have added files > 4a3fc21 internal/lsp: only linkify urls with http, https, and ftp schemes > 04fc2ba cmd/godoc: skip TestWeb if waitForServerReady fails > 6872d3b passes/unusedwrites: Add TODO for how to handle generics. > 7c895e0 pointer: Adds unit tests for pointer with type parameters. > ddadc42 guru: Add a TODO list to the guru cmd. > c39ac6a callgraph/vta: Removes dead return statement (misc cleanup). > aafffac internal/lsp/source: avoid panic in HoverIdentifier > c862641 cmd/digraph: only print non-trivial sccs > 6fff1af go/analysis/passes/errorsas: update testdata for new warning > 115b454 go/analysis/passes/errorsas: warn if errors.As target is *error > 60b4456 go/callgraph/static: adds tests for (instantiated) generics > a37ba14 go/callgraph/cha: adds tests for (instantiated) generics > dcaea06 go/callgraph/vta: adds tests for (instantiated) generics > b44fad8 lsp/completion: fix func literals with type params > 5bb9a5e lsp/completion: fix literal completions with type params > 0941294 lsp/completion: further improve generic func arg ranking > c903563 internal/lsp/cache: don't cache parsed files when checking for metadata > 825b661 nilness: add unit test for generic instantiation. > 2548a8b ssautil: Add unit tests that set ssa.InstantiateGenerics > ae12e8f ssa: switch lblocks to types.Object > 559469a internal/lsp: render package documentation when hovering over a package import > fa7afc9 lsp/completion: improve generic func arg ranking > d567bc1 go/ssa: monomorphize generic instantiations. > 5d7ca8a go/ssa: return nil on parameterized types on MethodValue. > 48a2cc8 x/tools: remove dependency on golang.org/x/xerrors > 235b13d cmd/godoc: remove usage of golang.org/x/xerrors > b22f048 internal/jsonrpc2*: remove usage of golang.org/x/xerrors > bcfc38f go/packages: remove usage of golang.org/x/xerrors > 37590b3 gopls: remove usage of golang.org/x/xerrors > e854e02 go/ssa: fix miscompilation of <<= and >>= statements > c02adcc go/packages: ask for EmbedPatterns and EmbedFiles if needed > 5bb9c48 x/tools/go/packages: on Go 1.19+, explicitly ask for -json fields needed > 00aa68c go/ssa/interp: use *ssa.Global as key type for interpreter.globals > b4aba4b go/internal/gcimporter: key tparams by Package instead of pkgname > 46bc274 go/ssa: Update callee for wrapper function instantiation. > 884ffcd go/analysis: add support for loong64 > afc6aad go/packages: make loadFromExportData ignore go.shape > b7d7574 internal/lsp/protocol: avoid replying with non-nil interface values in case of error > 1f10767 gopls/doc: update neovim examples for nvim 0.7 > a220087 internal/lsp/protocol: ignore reply values with non-nil errors in jsonrpc2_v2 adapters > d5f48fc all: gofmt > d996daa go/ssa: gofmt > f9c13bb go/pointer: gofmt > ad8ef15 go/callgraph: gofmt > ce1e683 go/analysis: gofmt > 2bbdb7a gopls, internal/lsp: gofmt > 5fef6fd cmd: gofmt > 04fab9a go/callgraph/vta: avoids cycles for pathological recursive types > fbebf43 go/internal: gofmt > b900e88 go/ssa: emit Low expression before High in *ast.Slice > b2552ef internal/lsp: run go mod vendor exclusively to avoid file contention > 9e788ee internal/lsp/fake: consider mtime when polling for file changes > fe932b4 go/ssa: Instantiate calls to generic functions and methods. > ce5936c go/ssa: bound functions are now unique per instantiation. > 7dd9f20 go/ssa: Adds datastructures for function instantiation. > ee2bc8b go/ast/astutil: fix panic in DeleteNamedImport from line directive > 48e6d8d cmd/fiximports: skip TestFixImports on plan9-arm > 7f10777 gopls/internal/regtest/modfile: temporarily skip TestSumUpdateFixesDiagnostics > 7cc24c2 gopls: upgrade staticcheck to v0.3.0 > 1f763df internal/lsp: add semantic tokens for arrows in declarations > b3e0236 go/ssa: Track created functions in the builder. > 6731659 go/ssa: adds position info to implicit field selection instructions > 74cea6e internal/imports: ignore some line directives > 37acb39 internal/lsp: run vulncheck in specified dir > 4077921 all: fix spelling > ff66cbe internal/lsp: remove unused parameters from moduleAtVersion > 7d125fe cmd/callgraph: expand windows/arm64 skip to the whole platform > 153e30b internal/lsp/lsprpc: only propagate explicit GOWORK when using remote > cda13e2 internal/lsp: fix incorrect line and start of semantic tokens > 41787c4 gopls: run go mod tidy -compat=1.16 to fix the 1.16 build > b9a4807 internal/gopathwalk: remove unnecessary call to os.Lstat > 8e193c2 go/ssa: removes conversion of index value in Index and IndexAddr to int > 9d8009b go/analysis: validate report if analyzer.Run is empty > 761e51f go/ssa/interp: Adds reflect.DeepEqual model for interp testing > e342718 gopls/internal/vulncheck: skip vuln entries without callstacks > b22bc85 gopls/doc: update stale documentation on generics > e693fb4 go/internal/gcimporter: fix IImportBundle error text > ed5a15c go/internal/gcimporter: replace assert with more helpful panic > f4515dd go/packages: fix load with NeedTypes but not NeedImports > 11930bd go/packages: fix handling of NeedExportFile in go list > e0095ae go/packages: fix precedence typo in needtypes calculation > e309672 go/packages: rename NeedExportsFile to NeedExportFile > 54af36e internal/lsp: handle invalid URL args in command params > 707beb0 internal/lsp/source: descend into fields and field lists in qualifyExpr > 1e5ae83 internal/lsp/command: remove unnecessary json struct tag > b7db7eb internal/lsp/cmd: add vulncheck command > c62a3b3 gopls/internal/vulncheck: limit the included callstack count > 78ff15e tools: fix some typos > f23240f gopls/go.mod: switch to golang.org/x/vuln/vulncheck > 4adaded internal/lsp/source: handle empty strings in directoryFilters > 2536df9 internal/lsp/source: include builtin name in hovered signature > cd31eaa internal/lsp/command: add RunVulncheckExp > 4737f45 internal/lsp/command: add VulncheckArgs/Result types > 84a0321 doc/generate.go: handle non-empty JSON tag correctly > 4460e9b gopls/internal/vulncheck: copy x/vuln/cmd/govulncheck/cache.go > 9fd677e gopls/internal/vulncheck: add cmd that runs govulncheck-like analysis > b169789 go/ssa: add position information for switch case conditions > 9814b1b gopls: update settings link to code lenses > 87a8611 x/tools/go/packages: add Embed support > 1428e83 lsp/completion: fix bogus generic func conversion > cbdab03 lsp/completion: fix bogus type param candidate > 3a6cbd6 lsp/completion: improve completion for func type params > c717623 go/analysis/passes/asmdecl: define register-ABI result registers for PPC64 > 86b02b3 internal/lsp/cache: check for nil WorkFile.Go > 5ea13d0 internal/lsp/source: move doc links to the bottom of hover > 779dfa4 internal/lsp: invalidate package on go.mod change with go.work > c7b0e9a internal/lsp/template: fix processing of multi-line tokens > e998cd2 internal/lsp: remove unused code > 877ec07 internal/lsp/cache: remove unused code > 85d68bc internal/lsp: update LSP stubs, including provisional InlayHints > fb5dfde internal/imports: update stdlib index for 1.18 > d67eab4 go/types/objectpath: break cycles through type parameters in find > 77aa08b internal/completion: default to regular completion for f.Fuzz without f.Add > 6799a7a internal/lsp/source: canonicalize objects in reference/rename requests > 54a569a internal/imports: use first quote when matching import path > 40370f8 go/internal/gcimporter: add a test case for issue 51219 > 24806f2 go/analysis: add tests check for calling *F methods in fuzz func > dff7c5f go/internal/gcimporter: guard against infinite recursion with recursive > 49d48a0 go/analysis/passes/composite: allow InternalFuzzTarget > 198cae3 go/ssa: split pkg() into different cases for *Package and *types.Package > ee31f70 internal/lsp: add completion for use directives > 622cf7b internal/lsp/cache: copy workFile when invalidating workspace > e7a12a3 go/ssa: add type substitution > c773560 internal/lsp/cache: set GOWORK=off when mutating modfiles > 613589d internal/lsp: more precise completions for *testing.F fuzz methods > 9f99e95 go/analysis: add analyzer for f.Add > 7b442e3 go/callgraph/vta: fix package doc > 1670aad go/analysis: fix bug with finding field type > fd72fd6 go/ssa/interp: adding external functions for tests > b105aac internal/lsp: use regexp to add go mod edit -go quick fix > 03d333a internal/lsp: add snippet completion for function type parameters > 94322c4 go/internal/gcimporter: pass -p to compiler in test > b59c441 internal/lsp/cache: always consider go.work files for ws expansion > e155b03 cmd/getgo: exec main from TestMain instead of running 'go build' in tests > e562276 internal/lsp: add hover for go.work use statements > 121d1e4 internal/lsp: report diagnostics on go.work files > 0eabed7 cmd/file2fuzz: exec main from TestMain instead of running 'go build' in tests > 19fe2d7 gopls: update xurls dependency, remove \b workaround > 3ce7728 internal/lsp/source: support stubbing concrete type params > 3286927 internal/lsp/cache: construct workspace even when go.work has error > 09e0201 go/ssa: determine whether a type is parameterized. > e43402d go/ssa: changes Package.values to objects. > a972457 go/ssa: adds *types.Info field to ssa.Function. > fc47946 go/ssa: Move BasicBlock operations into block.go > 7103138 gopls: add regtest for edit go directive quick fix > 4a5e7f0 internal/lsp: correctly apply file edits for edit go directive > 6a6eb59 go/ssa: Put type canonicalization on own mutex. > afc5fce gopls/doc: address additional comments on workspace.md > abbbcaf gopls/doc: update the documentation for workspaces to suggest go.work > 72442fe gopls: update neovim documentation for imitating goimports > ffa170d internal/jsonrpc2_v2: fix a racy map assignment in readIncoming > 625c871 gopls: update neovim documentation for using go.work > fb3622a signature-generator: add Go func signature fuzzing tools > 5d35a75 internal/jsonrpc2_v2: clarify documentation > abc106c gopls/integration/govim: build gopls using go1.18rc1 > c2ddf3d internal/lsp: add quick fix for unsupported feature > 0e44f7a gopls/doc/advanced.md: correct commands for unstable version build > acdddf6 go/ssa: allows right operand of a shift to be signed. > 9ffa3ad internal/lsp: Provide completions for test function definitions > b7525f4 internal/lsp: hash go version into package key > 5210e0c gopls: wire in LangVersion and ModulePath for gofumpt formatting > e6ef770 go/types/typeutil: don't recurse into constraints when hashing tparams > 258e473 internal/lsp/source: disable the useany analyzer by default > b7d2949 internal/lsp: don't store diagnostics for builtin.go > 4f21f7a gopls: update gofumpt to v0.3.0 > 3e31058 internal/imports: update to permit multiple main modules > 43f084e internal/typesinternal: update typesinternal for 1.18 bumping k8s.io/apimachinery 97e5df2...478dd6e: > 478dd6e Merge pull request # 112527 from liggitt/automated-cherry-pick-of-# 112526-upstream-release-1.25 > 14bc1be Limit redirect proxy handling to redirected responses > 8252641 Merge pull request # 112330 from enj/automated-cherry-pick-of-# 112193-upstream-release-1.25 > 10b456c Merge pull request # 112161 from pohly/automated-cherry-pick-of-# 112129-origin-release-1.25 > 4759a80 Add an option for aggregator > 3296217 dependencies: update to ginkgo v2.1.6 and gomega v1.20.1 > 117bd9b Merge pull request # 111113 from mimowo/retriable-pod-failures-job-controller > 74deb3d Merge pull request # 111696 from liggitt/go119mod > dbffa07 Support handling of pod failures with respect to the specified rules > fef5499 Update go.mod to go1.19 > 41606c6 Merge pull request # 111677 from dims/stop-panic-in-govet-levee > 6627090 run lint-dependencies and follow directions > addc01f Stop panic in govet-levee CI job > f15b816 Merge pull request # 110495 from alexzielenski/atomic-objectreference > e68cae5 update kube-openapi > b541046 Merge pull request # 111557 from alexzielenski/update-smd-422 > ace683f update smd to 4.2.3 > 899984f Merge pull request # 111587 from ialidzhikov/k8s-utils@ee6ede2d64 > c77a8ed Update `k8s.io/utils` to `ee6ede2d64ed` > 954536d Merge pull request # 111450 from HecarimV/fix-22072710 > d58901c Merge pull request # 111454 from HecarimV/fix-log-capitalized > a9b0d05 cleanup: omit redundant arguments in make call > 8b07078 Merge pull request # 111496 from HecarimV/unnecessary-fmt > 1be2ea2 cleanup: fix some error log capitalization > 3bab4b1 Remove unnecessary use of fmt.Sprintf > 47ba8cb Merge pull request # 111442 from ialidzhikov/k8s-utils@56c0de1e6f > 0a1c3aa Update `k8s.io/utils` to `9bab9ef40391` > 7fb0342 Merge pull request # 111254 from dims/update-to-golang-1.19-rc2 > 9652184 Merge pull request # 106388 from alexzielenski/ssa-ignore-nonsemantic-changes > fdf7942 Generate and format files > 915d89a Merge pull request # 111173 from BinacsLee/binacs/regenerate-sets > 65bf58a optimize nil and empty also for slices > 0661104 Merge pull request # 110178 from kevindelgado/validation-beta-1-25 > fb683c6 Re-Generate k8s.io/apimachinery/pkg/util/sets > 6586a12 optimize nil and empty case for parity with other branch > 5d375c1 update kjson > 019f1e1 revert timestamp updates to object if non-managed fields do not change > cff14a5 Merge pull request # 111081 from HecarimV/fix-22071210 > afc5e00 Merge pull request # 111008 from cici37/bumpCEL > 6f7b214 Fix: some typo in apimachinery/pkg > 51e28bc Merge pull request # 111097 from saltbo/fix-thethe-typo > cd7836f Bump cel-go to v0.12.0 > 5074e27 fix: update the typo code comment > 0897ed8 Merge pull request # 108532 from cbandy/status-cause > 9cb1f71 Merge pull request # 110916 from zhoumingcheng/master-code-v1 > 9291eff api/errors: Improve performance of Is* functions > 4afd3f4 Merge pull request # 109111 from chendave/ginkgo_upstream > 8c521e1 Fix a typo > 1eec2ee Use errors.As to detect wrapping in StatusCause > c87322d update ginkgo from v1 to v2 and gomega to 1.19.0 > 2496976 Merge pull request # 111001 from pohly/klog-update > d40a017 build: update to klog v2.70.1 > a869692 Merge pull request # 110831 from chendave/openapi > e4283bb Bump `kube-openapi` to the latest > 66bbc50 Merge pull request # 110788 from 21kyu/change_reflect_ptr > 55378ba Change reflect.Ptr to reflect.Pointer > e74e8a9 Merge pull request # 110724 from pohly/klog-update > 21dbaf7 build: update to klog v2.70.0 > eda93e0 Merge pull request # 110448 from twilight0620/test0608 > c5be385 Merge pull request # 110378 from lucacome/bump-grpc > 6243438 add some uts of group_version.go > bae69c6 Bump grpc to v1.47.0 > b90ea24 Merge pull request # 110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1 > 1831736 Update gopkg.in/yaml.v3 to v3.0.1 > d407afb Merge pull request # 110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful > 5e1e879 Switch to v3 of github.com/emicklei/go-restful > be3a79b Merge pull request # 109892 from jlsong01/add_annotation_comments > 5abf6e2 Merge pull request # 110207 from wojtek-t/clean_shutdown_managers > 21bf400 clarify a comment on annotation key validation > be75d4d Make contextForChannel public > e3c6631 Merge pull request # 110079 from ash2k/dial-with-context > e929c35 Always dial using a context > e572490 Merge pull request # 109752 from MadhavJivrajani/remove-apimachinery-clocks > e11374f Merge pull request # 110040 from astoycos/fix-panic > 5526e82 apimachinery/clock: Delete the clock package > ca5c89b Merge pull request # 110029 from ash2k/ash2k/no-double-tls-validation > 7c09d67 Fix additional panic > 4f2ae94 tls.Dial() validates hostname, no need to do that manually > ec91382 Write Unit test to imitate Panic > 28c7554 Merge pull request # 109651 from ash2k/ash2k/spdy-cleanup > f3b1305 Merge pull request # 108080 from astoycos/issue-132 > 284911f Pass context for TLS dial > 1c398d5 Merge pull request # 107213 from mk46/portname_validation > 912a38b Fix Panic Condition > f1ceaed Don't clone headers twice > 4778951 Merge pull request # 109891 from pohly/log-dependency-update > b243f86 Fixed portName validation error message. > b85d889 Merge pull request # 109602 from lavalamp/remove-clustername > 1c1f82a dependencies: logr and zapr v1.2.3 > 0ac710b generated files > 430b920 Remove ClusterName > 5f6d692 Merge pull request # 109804 from cici37/celUpdate > a5de00b Merge pull request # 109750 from aojea/spdy_tls > b6901b9 Update go-control-plane, cncf/xds/go, cncf/udpa/go and remove unused versions > b042ede Merge pull request # 109440 from liggitt/gomod-1.18 > e57894b spdyroundtripper: d tlson't verify hostname twice > 535f064 Update GRPC > 92ee148 Regenerate vendor > 1564fe5 spdyroundrippter: close the connection if tls handshake fails > 5ac2923 Update genproto and antlr. > f71cc27 Merge pull request # 109259 from roycaihw/tweak-quantity-docs > 54c2bc0 Bump cel-go to v0.11.2 > 080c0c7 Merge pull request # 109212 from alexzielenski/copylock-fix > af9793b Generated files > cf0bfa9 Tweak Quantity docstring for ease of reference generation bumping golang.org/x/net 27dd868...a158d28: > a158d28 A+C: delete AUTHORS and CONTRIBUTORS > 1185a90 ipv4,ipv6: retry ENOBUFS in TestPacketConnReadWriteUnicastUDP > c90051b http2/h2i: update install documentation > 69896b7 lif: use SIOCGLIF*, AF_* and SOCK_DGRAM consts from x/sys/unix > 1bab6f3 lif: use IFT_* consts from x/sys/unix > 263ec57 lif: remove unused sysIFF_* constants > 9d032be Revert "http2: enable VerboseLogs in TestTransportGroupsPendingDials" > 355a448 http2: enable VerboseLogs in TestTransportGroupsPendingDials > 694bf12 http2: add newly dialed conns to the pool before signaling completion > fb05da6 nettest: skip known failure mode of TestTestConn/TCP/RacyRead on windows/arm64 > c690dde http2: remove arbitrary timeouts in server_test.go > c960675 http2: eliminate arbitrary timeouts in testServerResponse > c186220 http2: prioritize RST_STREAM frames in priority write scheduler > 5463443 go.mod: update golang.org/x/sys to latest version > 1d687d4 http2/h2c: support direct hand off of h2c-upgrade connections > 2e3eb7b http2: optimization of AppendHuffmanString > 183a9ca http2: exclude some header from 1xx responses > 20f9603 nettest: log more details about err for checkForTimeoutError > 45b2658 all: fix go vet warnings > 9564170 http2: allow sending 1xx responses > 2871e0c ipv4,ipv6: retry ENOBUFS and shut down the PacketConn on failure in TestPacketConnConcurrentReadWriteUnicastUDP > 1d1ef93 http2: use custom concurrent safe noBodyReader type when no body is present > 1850ba1 http2: make the Server use the priority write scheduler > a630d4f http2: support concurrent Request.Close calls > 290c469 all: gofmt > aac1ed4 http2: skip "write: broken pipe" failures in TestServer on OpenBSD > 749bd19 net/http2: omit invalid header value from error message > 543a649 http2: log pings and RoundTrip retries when http2debug=1 > de3da57 net/http/httpproxy: support non-ASCII characters in NO_PROXY bumping k8s.io/utils 3a6ce19...ee6ede2: > ee6ede2 Merge pull request # 252 from ialidzhikov/cleanup/testdata > 9bab9ef Merge pull request # 251 from dims/tolerate-path-lookup-issues-in-golang-1.19 > a4934a1 Move test data file under testdata/ > 56c0de1 Merge pull request # 249 from ialidzhikov/pointer-func-deprecations > ee5bcf5 tolerate path lookup issues in golang 1.19 > f6158b4 Merge pull request # 248 from aojea/ci > 161a940 Properly deprecate the funcs from the pointer pkg > 74ebc72 IP.UnmarshalText() uses net.Parse internally > 105d5f1 fix linter > f2fee6f call to (*T).Fatalf from a non-test goroutine (govet) > 8cc7140 update github CI bumping k8s.io/code-generator 65c70a5...7e9837e: > 7e9837e Merge pull request # 112161 from pohly/automated-cherry-pick-of-# 112129-origin-release-1.25 > ecb165b dependencies: update to ginkgo v2.1.6 and gomega v1.20.1 > 775c304 Merge remote-tracking branch 'origin/master' into release-1.25 > d31c93c Revert "Remove gcp and azure auth plugins" > 7a6b27b Update go.mod to go1.19 > fa4467d Merge pull request # 111677 from dims/stop-panic-in-govet-levee > 7b3066b run lint-dependencies and follow directions > c04cb7f Stop panic in govet-levee CI job > aed7155 Merge pull request # 110495 from alexzielenski/atomic-objectreference > 02dff21 update kube-openapi > 24b65b5 Update kubectl kustomize to kyaml/v0.13.9, cmd/config/v0.10.9, api/v0.12.1, kustomize/v4.5.7 (# 111606) > ce96325 Merge pull request # 111557 from alexzielenski/update-smd-422 > 3e298a9 update smd to 4.2.3 > 98b8ad1 Merge pull request # 111587 from ialidzhikov/k8s-utils@ee6ede2d64 > 7d41d4b Update `k8s.io/utils` to `ee6ede2d64ed` > f7e6982 Merge pull request # 111442 from ialidzhikov/k8s-utils@56c0de1e6f > 5e969f2 Update `k8s.io/utils` to `9bab9ef40391` > 22db44c Merge pull request # 111254 from dims/update-to-golang-1.19-rc2 > 53c2ca0 Generate and format files > a08f67b Merge pull request # 110178 from kevindelgado/validation-beta-1-25 > e22e97f update kjson > 40a88eb Merge pull request # 111008 from cici37/bumpCEL > 9a892d0 Bump cel-go to v0.12.0 > d665e29 Merge pull request # 108792 from wongearl/modify-todo > dc61ef8 Merge pull request # 111001 from pohly/klog-update > dec659d fix CustomArgs annotation, todo describe > 162a509 build: update to klog v2.70.1 > 132cd9f Merge pull request # 110831 from chendave/openapi > 0bd13bc Bump `kube-openapi` to the latest > 068d9f8 Merge pull request # 110724 from pohly/klog-update > 051a429 build: update to klog v2.70.0 > 4e8f8f5 Merge pull request # 110378 from lucacome/bump-grpc > 39381c1 Bump grpc to v1.47.0 > a2acbb4 Merge pull request # 110546 from liggitt/fix-example > cb496e7 Merge pull request # 110518 from dims/switch-to-released-version-of-v3.8.0-github.com/emicklei/go-restful/v3 > e246394 Drop spurious replace > f2ea995 Merge pull request # 110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1 > 306deab Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3 > d8adc26 Update gopkg.in/yaml.v3 to v3.0.1 > 35a5f00 Merge pull request # 110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful > e1fbd90 Switch to v3 of github.com/emicklei/go-restful > 7d977b3 Merge pull request # 110013 from enj/enj/i/remove_azure_gcp_auth_plugins > 7e85903 Remove gcp and azure auth plugins > 9f887a7 Merge pull request # 109891 from pohly/log-dependency-update > acd6f5b Merge pull request # 109602 from lavalamp/remove-clustername > 7c0fe80 dependencies: logr and zapr v1.2.3 > 05559de generated files > 8ed2cce Merge pull request # 109804 from cici37/celUpdate > f82eadd Update go-control-plane, cncf/xds/go, cncf/udpa/go and remove unused versions > cd6d91a Update GRPC > df8059b Update genproto and antlr. > 4a69c11 Bump cel-go to v0.11.2 > 0a834f8 Merge pull request # 109440 from liggitt/gomod-1.18 > 5cbad16 Regenerate vendor > 8f17de0 Merge pull request # 109031 from Jefftree/openapiv3beta > 858bf3c generated: Update kube-openapi and vendor bumping k8s.io/client-go 3e73df6...593f096: > 593f096 Update dependencies to v0.25.2 tag > 1904631 Merge pull request # 112161 from pohly/automated-cherry-pick-of-# 112129-origin-release-1.25 > 8f4eb75 Merge pull request # 112336 from enj/automated-cherry-pick-of-# 112017-upstream-release-1.25 > e278668 dependencies: update to ginkgo v2.1.6 and gomega v1.20.1 > 1874bc6 exec auth: support TLS config caching > db7e2d8 Merge pull request # 112055 from aanm/automated-cherry-pick-of-# 111752-origin-gh-aanm-release-1.25 > c9008f3 client-go/rest: check if url is nil to prevent nil pointer dereference > 1a46dfd Revert "client-go: remove no longer used finalURLTemplate" > b3e4a40 Merge remote-tracking branch 'origin/master' into release-1.25 > c2f61ae Update removal warnings to 1.26 > 54e42ab update-gofmt > ef26118 Revert "Remove gcp and azure auth plugins" > a890e7b Merge pull request # 109090 from sarveshr7/multicidr-rangeallocator > f10f16e Merge pull request # 111113 from mimowo/retriable-pod-failures-job-controller > 76884cd Auto generate code for ClusterCIDR API > 3300752 Merge pull request # 111696 from liggitt/go119mod > c439b25 Support handling of pod failures with respect to the specified rules > ce9ac37 Merge pull request # 108692 from jsafrane/selinux > 4100519 Update go.mod to go1.19 > a00e9ab Regenerate files > 55b6f70 Merge pull request # 111677 from dims/stop-panic-in-govet-levee > 606e4a8 run lint-dependencies and follow directions > fe9020e Stop panic in govet-levee CI job > e803ec6 Merge pull request # 110495 from alexzielenski/atomic-objectreference > 07171f8 Merge pull request # 111090 from kinvolk/rata/userns-support-2022 > b5feb25 mark persistentvolume's claimRef as granular > bebf219 Update kubectl kustomize to kyaml/v0.13.9, cmd/config/v0.10.9, api/v0.12.1, kustomize/v4.5.7 (# 111606) > 912b04a Update autogenerated files > c5a511a update kube-openapi > 68639ba Merge pull request # 111557 from alexzielenski/update-smd-422 > 828c3cb pkg/apis, staging: add HostUsers to pod spec > b0d4101 Merge pull request # 111475 from alculquicondor/clear_pod_disruption > 1631be4 update smd to 4.2.3 > 3dfaef5 Add clock interface to disruption controller > 3e9c4b4 Merge pull request # 111587 from ialidzhikov/k8s-utils@ee6ede2d64 > 2037cc6 Update `k8s.io/utils` to `ee6ede2d64ed` > 07735ea Merge pull request # 111441 from denkensk/respect-topology > 95367f2 Merge pull request # 110851 from negz/more-like-mac-slow-s > 2190b2f code generated by script for MatchLabelKeys in TopologySpreadConstraint > ec0f337 Merge pull request # 111387 from marseel/feature/retry_internal_errors > 761f55c Use SHA256 sums to verify discovery cache integrity > c2d2c47 Merge pull request # 111228 from Abirdcfly/220716 > ff6bf67 Add option to retry internal api error in reflector. > 735524f Use sha256 to sanitize discovery HTTP cache keys > fe12e65 Merge pull request # 111442 from ialidzhikov/k8s-utils@56c0de1e6f > 65b1e7d clean Unreachable code > 1ea239f Use checksums instead of fsyncs to manage discovery cache corruption > 7a55c3b Update `k8s.io/utils` to `9bab9ef40391` > 76fccca Add a benchmark for the discovery cache RoundTripper > cc879cd Merge pull request # 111254 from dims/update-to-golang-1.19-rc2 > b5c7588 Merge pull request # 109141 from ulucinar/bump-discovery-burst > 2a6c116 Generate and format files > b2097e6 Merge pull request # 110666 from ldsdsy/modify > 4aac6a7 Bump discovery burst of default ConfigFlags to 300 > 4db4856 Merge pull request # 111242 from wojtek-t/fix_leaking_goroutines_11 > 123d4e7 Fix a typo > ed7d154 Bump default burst limit for discovery client to 300 > 95a40e2 Merge pull request # 110178 from kevindelgado/validation-beta-1-25 > 9dde02d Clean shutdown of client integration tests > 267b657 Merge pull request # 111235 from Abirdcfly/220719 > b4c3510 update kjson > 0cfc963 Merge pull request # 110649 from harshanarayana/fix/GIT-110335-fix-fake-event-expansion > ca60e0e fix a possible panic because of taking the address of nil > c6bd30b Merge pull request # 111176 from p0lyn0mial/upstream-cacher-refactor-for-streaming > e2ef408 GIT-110335: address namespace defaulting for events > 441e2c8 reflector: simplify reading the resourceVersion > 04f67d5 reflector: move LIST to its own method > 4e28921 reflector: refactor watchHandler > 163ee0b Merge pull request # 111080 from zhoumingcheng/master-v3 > 743e29d Merge pull request # 111008 from cici37/bumpCEL > 84e1219 Correct some wrong syntax > 79a582f Merge pull request # 111097 from saltbo/fix-thethe-typo > 7f7dbbc Bump cel-go to v0.12.0 > eabd428 Merge pull request # 111002 from HecarimV/fix-220707 > 7c3fa18 fix: update the typo code comment > 59fda2e Merge pull request # 111087 from HecarimV/fix-22071205 > f295032 fix static-check for staging/src/k8s.io/client-go/ > 2f582c2 Fix:import the same package multiple times > 3b969f9 Merge pull request # 111001 from pohly/klog-update > 26b5064 build: update to klog v2.70.1 > 506ef89 Merge pull request # 110990 from thockin/svc-typenames-IPFamilyPolicyType > 61a7d9d Rename IPFamilyPolicyType => IPFamilyPolicy > a16e76e Merge pull request # 110831 from chendave/openapi > 6a58c3a Bump `kube-openapi` to the latest > f5b6af4 Merge pull request # 110788 from 21kyu/change_reflect_ptr > 1b23c15 Change reflect.Ptr to reflect.Pointer > 8dfe88a Merge pull request # 110724 from pohly/klog-update > 899bcd7 Merge pull request # 110425 from LY-today/fake-evict-list-err > cb4a10d build: update to klog v2.70.0 > 0647d43 Merge pull request # 109632 from weilaaa/recorrect_byindex_input_param > 9ac8bfe fix: list pod err after an pod evicted > acab036 Merge pull request # 110436 from nicks/nicks/issue-1108 > 64585cf correct input params and add godoc > 830d4c4 Merge pull request # 110378 from lucacome/bump-grpc > 5ce7078 client-go: fix panic in ConfirmUsable validation > e0fa504 Bump grpc to v1.47.0 > 2a9f955 Merge pull request # 110518 from dims/switch-to-released-version-of-v3.8.0-github.com/emicklei/go-restful/v3 > d4fc9af Merge pull request # 110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1 > 7e1edab Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3 > 08b4bbc Update gopkg.in/yaml.v3 to v3.0.1 > 87a5b7b Merge pull request # 110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful > cf0ba13 Switch to v3 of github.com/emicklei/go-restful > f88de91 Merge pull request # 96771 from soltysh/shortcut_expander > e2598a4 restmapper: re-try shortcut expander after not-found error > cf13620 Merge pull request # 84145 from bells17/fix-typo > 33115b4 Merge pull request # 110100 from tkashem/client-go-backoff-fix > 21f4308 Fix typo: type -> eventtype > 0bc005e Merge pull request # 110076 from karlkfi/patch-1 > 71b8c17 client-go: fix backoff delay > 8764064 fix: reflector to return wrapped list errors > ef63e49 Merge pull request # 110013 from enj/enj/i/remove_azure_gcp_auth_plugins > 1f7dc88 Remove gcp and azure auth plugins > 77f6364 Merge pull request # 108080 from astoycos/issue-132 > b4b8e5e Merge pull request # 108492 from kerthcet/feature/add-NodeInclustionPolicies > f19a514 Fix Panic Condition > 5bb1a76 feat: add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec > 2420926 Merge pull request # 109891 from pohly/log-dependency-update > 7c5b742 Merge pull request # 109602 from lavalamp/remove-clustername > c301d44 dependencies: logr and zapr v1.2.3 > 5a9c3ac generated files > c0ab12a Merge pull request # 109804 from cici37/celUpdate > bb66d80 Merge pull request # 109607 from liggitt/drop-unused-third-party > 631da0c Update go-control-plane, cncf/xds/go, cncf/udpa/go and remove unused versions > f4c553f Merge pull request # 109440 from liggitt/gomod-1.18 > 7481505 Remove package variables > 28feddd Update GRPC > ccff963 Regenerate vendor > 28c4a4d Drop unused golang/template funcs > a8fbc49 Update genproto and antlr. > 671a40c Merge pull request # 109520 from cncal/lcn_cleanup_duplicate_code_snippet > ac3e4ba Bump cel-go to v0.11.2 > 211d8a7 Merge pull request # 109443 from kevindelgado/dynamic-apply > 152e68f Remove the duplicate code snippet in client-go delaying_queue tests > 2cf1a8f Merge pull request # 105963 from zhucan/bugfix-95367 > 4eab6be Add Apply and ApplyStatus methods to dynamic ResourceInterface > 28ccde7 Merge pull request # 109436 from JamesLaverack/revert-108290 > 1f8debf generated code and doc > f9fdccd Revert "Introduce APIs to support multiple ClusterCIDRs (# 108290)" bumping golang.org/x/sync 036812b...886fb93: > 886fb93 A+C: delete AUTHORS and CONTRIBUTORS > 0de741c x/sync/errgroup: make note of the default errgroup goroutine limit (unlimited) > 0976fa6 x/sync/errgroup: add TryGo and SetLimit to control concurrency bumping github.com/google/go-cmp d103655...f144a35: > f144a35 Additional cleanup with Go 1.13 as minimal version (# 295) > 63c2960 remove xerrors (# 292) > 71220fc Use string formatting for slice of bytes (# 294) > 4664e24 Fix printing of types in reporter output (# 293) > 79433ac Run tests on Go 1.18 (# 290) > 039e37c Add //go:build lines (# 285) > 3242228 Drop hacks to work around Go reflection bugs in Go1.9 (# 282) > f59cd61 Update minimum supported version to go1.11 (# 281) > 6faefd0 Reduce minimum length for specialize string diffing (# 275) > f1773ad Use any alias instead of interface{} (# 276) > 9094ef9 Change build status badge (# 269) > 3ee52c8 Fix spelling mistakes (# 271) > 395a0ac Use sha256 in test (# 268) > 402949e Merge pull request # 266 from dsnet/fix-format > 290a6a2 Avoid shadowing variable (# 263) > d5fcb38 Fix textual printing of byte slices > 248ccff Fix staticcheck findings (# 262) bumping google.golang.org/grpc aff571c...5b509df: > 5b509df Change version to 1.47.0 (# 5377) > ed75225 Don't call cmp in non testing file (# 5370) > 081c688 client: fix hctx leakage in addrConn.createTransport (# 5337) > 30b9d59 client/SubConn: do not recreate addrConn if UpdateAddresses is called with the same addresses (# 5373) > 459729d xds/priority: avoid sending duplicate updates to children (# 5374) > 9f4b31a Added HTTP status and grpc status to POST check (# 5364) > 333a441 xds/ringhash: update connectivity state aggregation, and make sure at least one SubConn is connecting in TF (# 5338) > e23132c Added support for metadata matcher invert (# 5345) > d9b952b xds/resolver: use correct resource name in log message (# 5357) > db79903 xds/priority: start the init timer when a child switch to Connecting from non-transient-failure state (# 5334) > 462d867 xds: Add Outlier Detection configuration and CDS handling (# 5299) > 5c46f1a xdsclient/csds: fix leaked metadata (# 5339) > ee67b3d xds: Handle loops and ignore duplicates in aggregated cluster handling (# 5317) > 799605c client: fix potential panic during RPC retries (# 5323) > 78b13f2 xds/client: hold authority mutex before making a new authority (# 5331) > de73b2b examples: improve error messages (# 5329) > dc86d5d internal/proto: update generated code (# 5332) > 7567a5d documentation: fix typo in RegisterCodec godoc (# 5306) > 3bf6719 test/interop: register RLS to the interop test client (# 5272) > 8d68434 gcp/observability: correctly test this module in presubmit tests (# 5300) > ebd0983 xds/eds: reject EDS resources with multiple instances of the same locality in the same priority (# 5303) > 9711b14 server: clarify documentation around setting and sending headers and ServerStream errors (# 5302) > 924e484 server: return better status for context err when writing header (# 5292) > 5682cc6 Change version to 1.47.0-dev (# 5298) > 4467a29 gcp/observability: implement logging via binarylog (# 5196) > 18fdf54 cmd/protoc-gen-go-grpc: allow hooks to modify client structs and service handlers (# 5240) > 337b815 interop: build client without timeout; add logs to help debug failures (# 5294) > e583b19 xds: Add RLS in xDS e2e test (# 5281) > 0066bf6 grpc: perform graceful switching of LB policies in the `ClientConn` by default (# 5285) > 3cccf6a xdsclient: always backoff between new streams even after successful stream (# 5280) > 4e78093 xds: ignore routes with unsupported cluster specifiers (# 5269) > 99aae34 cluster manager: Add Graceful Switch functionality to Cluster Manager (# 5265) > 42cadc1 test: cleanup balancer switching tests (# 5271) > b6873c0 grpc: move to `TransientFailure` in `pick_first` LB policy when all addresses are removed (# 5274) > 474948a github: run all testing jobs to completion even if one fails (# 5282) > c57d2b1 clientconn: fix target parsing tests to be tolerant to new url.URL field OmitHost (# 5279) > 562e12f test: use channelz instead of stats handler to determine RPC count (# 5275) > e63e123 advancedtls: remove the usage of CDP in CRL enforcement (# 5218) > 3a74cd5 balancergroup: Add trigger point to gracefully switch a child (# 5251) > 34660d1 test: use `t.Fatal` instead of `panic` for service config parsing errors (# 5266) > 96bdede pickfirst: cleanup tests (# 5263) > e49486d test: add a test for clientConn close with pending RPC (# 5264) > 2fccb82 metadata: copy slices in FromContext() functions (# 5267) > 9d08896 github: update to test with Go 1.18 (# 5262) > 597e5d1 don't apply defaultSC upon receipt of invalid service config (# 5257) > 51ddcba xds: suppress redundant updates only when we are SERVING (# 5258) > 4635bf2 make the RLS LB policy name available in the internal package (# 5259) > 50d0d0a server: set TCP_USER_TIMEOUT socket option for linux (# 5219) > 7840bd6 grpc: add a comment explaining why updateClientConnState is handled inline (# 5261) > 7ea4af9 internal/googlecloud: refactor OS-dependent code (# 5239) > 1ffd63d binarylog: generalize binarylog's MethodLogger preparing for new observability features (# 5244) > 63bdcbc xds/interop: add xds_k8s_lb test suite (# 5250) > 89f3195 interop/client: simplify fallback test client and parameterize fallback deadline (# 5248) > 8078d1d balancergroup: Switched subBalancerWrapper to wrap a gracefulswitch.Balancer (# 5245) > 6131e9d examples: regenerate certs to use SHA256 signing algorithm (# 5256) > f95b001 xds: avoid log spam during server mode switches (better A36 compliance) (# 5215) > 97c3143 xds/client: accept resources wrapped in discoverypb.Resource message (# 5242) > 6c3ccbe grpc: remove remaining usages of grpc.WithInsecure() (# 5246) > fbe4ccb xds/client: include Node ID in error messages from the XdsClient (# 5223) > c4cabf7 grpc: handle invalid service configs by applying the default if available (# 5238) > 94ee386 test: cleanup roundrobin tests to use stubserver (# 5236) > 23cc28f security/authorization: upgrade cel-v0.10.1 and fix breaking API change. (# 5243) > 84793b5 xds/client: reset backoff when a message is received, even when the message is invalid (# 5241) > 722… Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
775f84a210
commit
ce26e92930
45
go.mod
45
go.mod
|
@ -3,16 +3,16 @@ module knative.dev/caching
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/google/go-cmp v0.5.6
|
||||
github.com/google/go-cmp v0.5.8
|
||||
github.com/hashicorp/golang-lru v0.5.4
|
||||
go.uber.org/zap v1.19.1
|
||||
k8s.io/api v0.24.4
|
||||
k8s.io/apimachinery v0.24.4
|
||||
k8s.io/client-go v0.24.4
|
||||
k8s.io/code-generator v0.24.4
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
|
||||
knative.dev/hack v0.0.0-20221004153928-92a65f105c37
|
||||
knative.dev/pkg v0.0.0-20221003153827-158538cc46ec
|
||||
k8s.io/api v0.25.2
|
||||
k8s.io/apimachinery v0.25.2
|
||||
k8s.io/client-go v0.25.2
|
||||
k8s.io/code-generator v0.25.2
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
|
||||
knative.dev/hack v0.0.0-20221010154335-3fdc50b9c24a
|
||||
knative.dev/pkg v0.0.0-20221011175852-714b7630a836
|
||||
)
|
||||
|
||||
require (
|
||||
|
@ -25,12 +25,12 @@ require (
|
|||
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/go-kit/log v0.1.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.0 // indirect
|
||||
github.com/go-logr/logr v1.2.2 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.15 // indirect
|
||||
|
@ -41,7 +41,7 @@ require (
|
|||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/imdario/mergo v0.3.5 // indirect
|
||||
github.com/imdario/mergo v0.3.6 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kelseyhightower/envconfig v1.4.0 // indirect
|
||||
|
@ -60,29 +60,28 @@ require (
|
|||
go.opencensus.io v0.23.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
|
||||
golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
google.golang.org/api v0.61.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
|
||||
google.golang.org/grpc v1.42.0 // indirect
|
||||
google.golang.org/protobuf v1.27.1 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
|
||||
google.golang.org/grpc v1.47.0 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 // indirect
|
||||
k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f // indirect
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
|
160
go.sum
160
go.sum
|
@ -47,16 +47,8 @@ contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/g
|
|||
contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
|
@ -68,8 +60,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
|
|||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
|
@ -94,18 +84,16 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht
|
|||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/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=
|
||||
|
@ -113,19 +101,13 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
|
|||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
|
||||
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
|
@ -141,16 +123,14 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
|
|||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||
github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM=
|
||||
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
||||
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
|
@ -194,7 +174,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
|
|||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
|
@ -208,8 +187,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/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.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
|
@ -240,9 +220,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
|
|||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
||||
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
|
@ -250,11 +227,10 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
|
|||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
|
||||
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
|
@ -289,8 +265,6 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ
|
|||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
|
@ -298,26 +272,14 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
|||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/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.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
|
||||
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
|
@ -373,7 +335,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
|||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
|
@ -401,9 +362,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/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-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -439,11 +397,10 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -468,7 +425,6 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
|||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
|
@ -483,11 +439,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd
|
|||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -515,11 +468,11 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -530,10 +483,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -548,7 +498,6 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -570,19 +519,15 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/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-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
@ -655,12 +600,11 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717 h1:hI3jKY4Hpf63ns040onEbB3dAkR/H/P83hw1TG8dD3Y=
|
||||
golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY=
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY=
|
||||
|
@ -763,8 +707,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc
|
|||
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA=
|
||||
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I=
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
|
@ -790,8 +734,9 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
|
|||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A=
|
||||
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
|
@ -805,8 +750,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
@ -814,11 +760,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
@ -840,40 +783,35 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.24.4 h1:I5Y645gJ8zWKawyr78lVfDQkZrAViSbeRXsPZWTxmXk=
|
||||
k8s.io/api v0.24.4/go.mod h1:42pVfA0NRxrtJhZQOvRSyZcJihzAdU59WBtTjYcB0/M=
|
||||
k8s.io/apimachinery v0.24.4 h1:S0Ur3J/PbivTcL43EdSdPhqCqKla2NIuneNwZcTDeGQ=
|
||||
k8s.io/apimachinery v0.24.4/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
|
||||
k8s.io/client-go v0.24.4 h1:hIAIJZIPyaw46AkxwyR0FRfM/pRxpUNTd3ysYu9vyRg=
|
||||
k8s.io/client-go v0.24.4/go.mod h1:+AxlPWw/H6f+EJhRSjIeALaJT4tbeB/8g9BNvXGPd0Y=
|
||||
k8s.io/code-generator v0.24.4 h1:HLnoAabkTFKy1Ex4cMvffz6KkWFJ7oFN2yX37Icbbyg=
|
||||
k8s.io/code-generator v0.24.4/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
|
||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8=
|
||||
k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0=
|
||||
k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs=
|
||||
k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA=
|
||||
k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo=
|
||||
k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4=
|
||||
k8s.io/code-generator v0.25.2 h1:qEHux0+E1c+j1MhsWn9+4Z6av8zrZBixOTPW064rSiY=
|
||||
k8s.io/code-generator v0.25.2/go.mod h1:f61OcU2VqVQcjt/6TrU0sta1TA5hHkOO6ZZPwkL9Eys=
|
||||
k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7 h1:RGb68G3yotdQggcyenx9y0+lnVJCXXcLa6geXOMlf5o=
|
||||
k8s.io/gengo v0.0.0-20220613173612-397b4ae3bce7/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||
k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f h1:dltw7bAn8bCrQ2CmzzhgoieUZEbWqrvIGVdHGioP5nY=
|
||||
k8s.io/klog/v2 v2.70.2-0.20220707122935-0990e81f1a8f/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU=
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20221004153928-92a65f105c37 h1:4xB0A2aWQtzUcFjpZf9ufxRsjt+E7tEL364VlPttI8s=
|
||||
knative.dev/hack v0.0.0-20221004153928-92a65f105c37/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/pkg v0.0.0-20221003153827-158538cc46ec h1:Cen2FjQ3sUDLfeKkP8gVA9YhLbj/VueTlGzLHHKWNfU=
|
||||
knative.dev/pkg v0.0.0-20221003153827-158538cc46ec/go.mod h1:qTItuDia3CTW2J9oC4fzJsXifRPZcFWvESKozCE364Q=
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA=
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU=
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4=
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
knative.dev/hack v0.0.0-20221010154335-3fdc50b9c24a h1:yfq1OMrkyYkxDeM0pmAOeN4YF16R/WG0C+VvLBeq4uc=
|
||||
knative.dev/hack v0.0.0-20221010154335-3fdc50b9c24a/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/pkg v0.0.0-20221011175852-714b7630a836 h1:0N7Zo/O+xeUUebJPm9keBaGclrUoEbljr3J1MsqtaIM=
|
||||
knative.dev/pkg v0.0.0-20221011175852-714b7630a836/go.mod h1:DMTRDJ5WRxf/DrlOPzohzfhSuJggscLZ8EavOq9O/x8=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.x
|
||||
|
||||
script: go test -v
|
|
@ -1,7 +0,0 @@
|
|||
all: test
|
||||
|
||||
test:
|
||||
go test -v .
|
||||
|
||||
ex:
|
||||
cd examples && ls *.go | xargs go build -o /tmp/ignore
|
|
@ -68,3 +68,4 @@ examples/restful-html-template
|
|||
|
||||
s.html
|
||||
restful-path-tail
|
||||
.idea
|
|
@ -0,0 +1 @@
|
|||
ignore
|
|
@ -0,0 +1,13 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.x
|
||||
|
||||
before_install:
|
||||
- go test -v
|
||||
|
||||
script:
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
|
@ -1,7 +1,106 @@
|
|||
## Change history of go-restful
|
||||
# Change history of go-restful
|
||||
|
||||
## [v3.8.0] - 20221-06-06
|
||||
|
||||
- use exact matching of allowed domain entries, issue #489 (#493)
|
||||
- this changes fixes [security] Authorization Bypass Through User-Controlled Key
|
||||
by changing the behaviour of the AllowedDomains setting in the CORS filter.
|
||||
To support the previous behaviour, the CORS filter type now has a AllowedDomainFunc
|
||||
callback mechanism which is called when a simple domain match fails.
|
||||
- add test and fix for POST without body and Content-type, issue #492 (#496)
|
||||
- [Minor] Bad practice to have a mix of Receiver types. (#491)
|
||||
|
||||
## [v3.7.2] - 2021-11-24
|
||||
|
||||
- restored FilterChain (#482 by SVilgelm)
|
||||
|
||||
|
||||
## [v3.7.1] - 2021-10-04
|
||||
|
||||
- fix problem with contentEncodingEnabled setting (#479)
|
||||
|
||||
## [v3.7.0] - 2021-09-24
|
||||
|
||||
- feat(parameter): adds additional openapi mappings (#478)
|
||||
|
||||
## [v3.6.0] - 2021-09-18
|
||||
|
||||
- add support for vendor extensions (#477 thx erraggy)
|
||||
|
||||
## [v3.5.2] - 2021-07-14
|
||||
|
||||
- fix removing absent route from webservice (#472)
|
||||
|
||||
## [v3.5.1] - 2021-04-12
|
||||
|
||||
- fix handling no match access selected path
|
||||
- remove obsolete field
|
||||
|
||||
## [v3.5.0] - 2021-04-10
|
||||
|
||||
- add check for wildcard (#463) in CORS
|
||||
- add access to Route from Request, issue #459 (#462)
|
||||
|
||||
## [v3.4.0] - 2020-11-10
|
||||
|
||||
- Added OPTIONS to WebService
|
||||
|
||||
## [v3.3.2] - 2020-01-23
|
||||
|
||||
- Fixed duplicate compression in dispatch. #449
|
||||
|
||||
|
||||
## [v3.3.1] - 2020-08-31
|
||||
|
||||
- Added check on writer to prevent compression of response twice. #447
|
||||
|
||||
## [v3.3.0] - 2020-08-19
|
||||
|
||||
- Enable content encoding on Handle and ServeHTTP (#446)
|
||||
- List available representations in 406 body (#437)
|
||||
- Convert to string using rune() (#443)
|
||||
|
||||
## [v3.2.0] - 2020-06-21
|
||||
|
||||
- 405 Method Not Allowed must have Allow header (#436) (thx Bracken <abdawson@gmail.com>)
|
||||
- add field allowedMethodsWithoutContentType (#424)
|
||||
|
||||
## [v3.1.0]
|
||||
|
||||
- support describing response headers (#426)
|
||||
- fix openapi examples (#425)
|
||||
|
||||
v3.0.0
|
||||
|
||||
- fix: use request/response resulting from filter chain
|
||||
- add Go module
|
||||
Module consumer should use github.com/emicklei/go-restful/v3 as import path
|
||||
|
||||
v2.10.0
|
||||
|
||||
- support for Custom Verbs (thanks Vinci Xu <277040271@qq.com>)
|
||||
- fixed static example (thanks Arthur <yang_yapo@126.com>)
|
||||
- simplify code (thanks Christian Muehlhaeuser <muesli@gmail.com>)
|
||||
- added JWT HMAC with SHA-512 authentication code example (thanks Amim Knabben <amim.knabben@gmail.com>)
|
||||
|
||||
v2.9.6
|
||||
|
||||
- small optimization in filter code
|
||||
|
||||
v2.11.1
|
||||
|
||||
- fix WriteError return value (#415)
|
||||
|
||||
v2.11.0
|
||||
|
||||
- allow prefix and suffix in path variable expression (#414)
|
||||
|
||||
v2.9.6
|
||||
|
||||
- support google custome verb (#413)
|
||||
|
||||
v2.9.5
|
||||
|
||||
- fix panic in Response.WriteError if err == nil
|
||||
|
||||
v2.9.4
|
|
@ -0,0 +1,8 @@
|
|||
all: test
|
||||
|
||||
test:
|
||||
go vet .
|
||||
go test -cover -v .
|
||||
|
||||
ex:
|
||||
find ./examples -type f -name "*.go" | xargs -I {} go build -o /tmp/ignore {}
|
|
@ -4,9 +4,10 @@ package for building REST-style Web Services using Google Go
|
|||
|
||||
[](https://travis-ci.org/emicklei/go-restful)
|
||||
[](https://goreportcard.com/report/github.com/emicklei/go-restful)
|
||||
[](https://godoc.org/github.com/emicklei/go-restful)
|
||||
[](https://pkg.go.dev/github.com/emicklei/go-restful)
|
||||
[](https://codecov.io/gh/emicklei/go-restful)
|
||||
|
||||
- [Code examples](https://github.com/emicklei/go-restful/tree/master/examples)
|
||||
- [Code examples use v3](https://github.com/emicklei/go-restful/tree/v3/examples)
|
||||
|
||||
REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping:
|
||||
|
||||
|
@ -18,6 +19,28 @@ REST asks developers to use HTTP methods explicitly and in a way that's consiste
|
|||
- PATCH = Update partial content of a resource
|
||||
- OPTIONS = Get information about the communication options for the request URI
|
||||
|
||||
### Usage
|
||||
|
||||
#### Without Go Modules
|
||||
|
||||
All versions up to `v2.*.*` (on the master) are not supporting Go modules.
|
||||
|
||||
```
|
||||
import (
|
||||
restful "github.com/emicklei/go-restful"
|
||||
)
|
||||
```
|
||||
|
||||
#### Using Go Modules
|
||||
|
||||
As of version `v3.0.0` (on the v3 branch), this package supports Go modules.
|
||||
|
||||
```
|
||||
import (
|
||||
restful "github.com/emicklei/go-restful/v3"
|
||||
)
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```Go
|
||||
|
@ -39,15 +62,15 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo
|
|||
}
|
||||
```
|
||||
|
||||
[Full API of a UserResource](https://github.com/emicklei/go-restful/tree/master/examples/restful-user-resource.go)
|
||||
[Full API of a UserResource](https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go)
|
||||
|
||||
### Features
|
||||
|
||||
- Routes for request → function mapping with path parameter (e.g. {id}) support
|
||||
- Routes for request → function mapping with path parameter (e.g. {id} but also prefix_{var} and {var}_suffix) support
|
||||
- Configurable router:
|
||||
- (default) Fast routing algorithm that allows static elements, regular expressions and dynamic parameters in the URL path (e.g. /meetings/{id} or /static/{subpath:*}
|
||||
- (default) Fast routing algorithm that allows static elements, [google custom method](https://cloud.google.com/apis/design/custom_methods), regular expressions and dynamic parameters in the URL path (e.g. /resource/name:customVerb, /meetings/{id} or /static/{subpath:*})
|
||||
- Routing algorithm after [JSR311](http://jsr311.java.net/nonav/releases/1.1/spec/spec.html) that is implemented using (but does **not** accept) regular expressions
|
||||
- Request API for reading structs from JSON/XML and accesing parameters (path,query,header)
|
||||
- Request API for reading structs from JSON/XML and accessing parameters (path,query,header)
|
||||
- Response API for writing structs to JSON/XML and setting headers
|
||||
- Customizable encoding using EntityReaderWriter registration
|
||||
- Filters for intercepting the request → response flow on Service or Route level
|
||||
|
@ -71,12 +94,11 @@ There are several hooks to customize the behavior of the go-restful package.
|
|||
- Trace logging
|
||||
- Compression
|
||||
- Encoders for other serializers
|
||||
- Use [jsoniter](https://github.com/json-iterator/go) by build this package using a tag, e.g. `go build -tags=jsoniter .`
|
||||
|
||||
TODO: write examples of these.
|
||||
- Use [jsoniter](https://github.com/json-iterator/go) by build this package using a tag, e.g. `go build -tags=jsoniter .`
|
||||
|
||||
## Resources
|
||||
|
||||
- [Example programs](./examples)
|
||||
- [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/)
|
||||
- [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/)
|
||||
- [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful)
|
||||
|
@ -85,4 +107,4 @@ TODO: write examples of these.
|
|||
|
||||
Type ```git shortlog -s``` for a full list of contributors.
|
||||
|
||||
© 2012 - 2018, http://ernestmicklei.com. MIT License. Contributions are welcome.
|
||||
© 2012 - 2022, http://ernestmicklei.com. MIT License. Contributions are welcome.
|
|
@ -0,0 +1,13 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| v3.7.x | :white_check_mark: |
|
||||
| < v3.0.1 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Create an Issue and put the label `[security]` in the title of the issue.
|
||||
Valid reported security issues are expected to be solved within a week.
|
|
@ -83,7 +83,11 @@ func (c *CompressingResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error
|
|||
}
|
||||
|
||||
// WantsCompressedResponse reads the Accept-Encoding header to see if and which encoding is requested.
|
||||
func wantsCompressedResponse(httpRequest *http.Request) (bool, string) {
|
||||
// It also inspects the httpWriter whether its content-encoding is already set (non-empty).
|
||||
func wantsCompressedResponse(httpRequest *http.Request, httpWriter http.ResponseWriter) (bool, string) {
|
||||
if contentEncoding := httpWriter.Header().Get(HEADER_ContentEncoding); contentEncoding != "" {
|
||||
return false, ""
|
||||
}
|
||||
header := httpRequest.Header.Get(HEADER_AcceptEncoding)
|
||||
gi := strings.Index(header, ENCODING_GZIP)
|
||||
zi := strings.Index(header, ENCODING_DEFLATE)
|
|
@ -14,7 +14,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/emicklei/go-restful/log"
|
||||
"github.com/emicklei/go-restful/v3/log"
|
||||
)
|
||||
|
||||
// Container holds a collection of WebServices and a http.ServeMux to dispatch http requests.
|
||||
|
@ -185,6 +185,11 @@ func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter)
|
|||
// when a ServiceError is returned during route selection. Default implementation
|
||||
// calls resp.WriteErrorString(err.Code, err.Message)
|
||||
func writeServiceError(err ServiceError, req *Request, resp *Response) {
|
||||
for header, values := range err.Header {
|
||||
for _, value := range values {
|
||||
resp.Header().Add(header, value)
|
||||
}
|
||||
}
|
||||
resp.WriteErrorString(err.Code, err.Message)
|
||||
}
|
||||
|
||||
|
@ -201,6 +206,7 @@ func (c *Container) Dispatch(httpWriter http.ResponseWriter, httpRequest *http.R
|
|||
|
||||
// Dispatch the incoming Http Request to a matching WebService.
|
||||
func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) {
|
||||
// so we can assign a compressing one later
|
||||
writer := httpWriter
|
||||
|
||||
// CompressingResponseWriter should be closed after all operations are done
|
||||
|
@ -231,28 +237,8 @@ func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.R
|
|||
c.webServices,
|
||||
httpRequest)
|
||||
}()
|
||||
|
||||
// Detect if compression is needed
|
||||
// assume without compression, test for override
|
||||
contentEncodingEnabled := c.contentEncodingEnabled
|
||||
if route != nil && route.contentEncodingEnabled != nil {
|
||||
contentEncodingEnabled = *route.contentEncodingEnabled
|
||||
}
|
||||
if contentEncodingEnabled {
|
||||
doCompress, encoding := wantsCompressedResponse(httpRequest)
|
||||
if doCompress {
|
||||
var err error
|
||||
writer, err = NewCompressingResponseWriter(httpWriter, encoding)
|
||||
if err != nil {
|
||||
log.Print("unable to install compressor: ", err)
|
||||
httpWriter.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
// a non-200 response has already been written
|
||||
// a non-200 response (may be compressed) has already been written
|
||||
// run container filters anyway ; they should not touch the response...
|
||||
chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) {
|
||||
switch err.(type) {
|
||||
|
@ -265,6 +251,29 @@ func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.R
|
|||
chain.ProcessFilter(NewRequest(httpRequest), NewResponse(writer))
|
||||
return
|
||||
}
|
||||
|
||||
// Unless httpWriter is already an CompressingResponseWriter see if we need to install one
|
||||
if _, isCompressing := httpWriter.(*CompressingResponseWriter); !isCompressing {
|
||||
// Detect if compression is needed
|
||||
// assume without compression, test for override
|
||||
contentEncodingEnabled := c.contentEncodingEnabled
|
||||
if route != nil && route.contentEncodingEnabled != nil {
|
||||
contentEncodingEnabled = *route.contentEncodingEnabled
|
||||
}
|
||||
if contentEncodingEnabled {
|
||||
doCompress, encoding := wantsCompressedResponse(httpRequest, httpWriter)
|
||||
if doCompress {
|
||||
var err error
|
||||
writer, err = NewCompressingResponseWriter(httpWriter, encoding)
|
||||
if err != nil {
|
||||
log.Print("unable to install compressor: ", err)
|
||||
httpWriter.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pathProcessor, routerProcessesPath := c.router.(PathProcessor)
|
||||
if !routerProcessesPath {
|
||||
pathProcessor = defaultPathProcessor{}
|
||||
|
@ -272,16 +281,18 @@ func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.R
|
|||
pathParams := pathProcessor.ExtractParameters(route, webService, httpRequest.URL.Path)
|
||||
wrappedRequest, wrappedResponse := route.wrapRequestResponse(writer, httpRequest, pathParams)
|
||||
// pass through filters (if any)
|
||||
if len(c.containerFilters)+len(webService.filters)+len(route.Filters) > 0 {
|
||||
if size := len(c.containerFilters) + len(webService.filters) + len(route.Filters); size > 0 {
|
||||
// compose filter chain
|
||||
allFilters := []FilterFunction{}
|
||||
allFilters := make([]FilterFunction, 0, size)
|
||||
allFilters = append(allFilters, c.containerFilters...)
|
||||
allFilters = append(allFilters, webService.filters...)
|
||||
allFilters = append(allFilters, route.Filters...)
|
||||
chain := FilterChain{Filters: allFilters, Target: func(req *Request, resp *Response) {
|
||||
// handle request by route after passing all filters
|
||||
route.Function(wrappedRequest, wrappedResponse)
|
||||
}}
|
||||
chain := FilterChain{
|
||||
Filters: allFilters,
|
||||
Target: route.Function,
|
||||
ParameterDocs: route.ParameterDocs,
|
||||
Operation: route.Operation,
|
||||
}
|
||||
chain.ProcessFilter(wrappedRequest, wrappedResponse)
|
||||
} else {
|
||||
// no filters, handle request by route
|
||||
|
@ -299,13 +310,75 @@ func fixedPrefixPath(pathspec string) string {
|
|||
}
|
||||
|
||||
// ServeHTTP implements net/http.Handler therefore a Container can be a Handler in a http.Server
|
||||
func (c *Container) ServeHTTP(httpwriter http.ResponseWriter, httpRequest *http.Request) {
|
||||
c.ServeMux.ServeHTTP(httpwriter, httpRequest)
|
||||
func (c *Container) ServeHTTP(httpWriter http.ResponseWriter, httpRequest *http.Request) {
|
||||
// Skip, if content encoding is disabled
|
||||
if !c.contentEncodingEnabled {
|
||||
c.ServeMux.ServeHTTP(httpWriter, httpRequest)
|
||||
return
|
||||
}
|
||||
// content encoding is enabled
|
||||
|
||||
// Skip, if httpWriter is already an CompressingResponseWriter
|
||||
if _, ok := httpWriter.(*CompressingResponseWriter); ok {
|
||||
c.ServeMux.ServeHTTP(httpWriter, httpRequest)
|
||||
return
|
||||
}
|
||||
|
||||
writer := httpWriter
|
||||
// CompressingResponseWriter should be closed after all operations are done
|
||||
defer func() {
|
||||
if compressWriter, ok := writer.(*CompressingResponseWriter); ok {
|
||||
compressWriter.Close()
|
||||
}
|
||||
}()
|
||||
|
||||
doCompress, encoding := wantsCompressedResponse(httpRequest, httpWriter)
|
||||
if doCompress {
|
||||
var err error
|
||||
writer, err = NewCompressingResponseWriter(httpWriter, encoding)
|
||||
if err != nil {
|
||||
log.Print("unable to install compressor: ", err)
|
||||
httpWriter.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
c.ServeMux.ServeHTTP(writer, httpRequest)
|
||||
}
|
||||
|
||||
// Handle registers the handler for the given pattern. If a handler already exists for pattern, Handle panics.
|
||||
func (c *Container) Handle(pattern string, handler http.Handler) {
|
||||
c.ServeMux.Handle(pattern, handler)
|
||||
c.ServeMux.Handle(pattern, http.HandlerFunc(func(httpWriter http.ResponseWriter, httpRequest *http.Request) {
|
||||
// Skip, if httpWriter is already an CompressingResponseWriter
|
||||
if _, ok := httpWriter.(*CompressingResponseWriter); ok {
|
||||
handler.ServeHTTP(httpWriter, httpRequest)
|
||||
return
|
||||
}
|
||||
|
||||
writer := httpWriter
|
||||
|
||||
// CompressingResponseWriter should be closed after all operations are done
|
||||
defer func() {
|
||||
if compressWriter, ok := writer.(*CompressingResponseWriter); ok {
|
||||
compressWriter.Close()
|
||||
}
|
||||
}()
|
||||
|
||||
if c.contentEncodingEnabled {
|
||||
doCompress, encoding := wantsCompressedResponse(httpRequest, httpWriter)
|
||||
if doCompress {
|
||||
var err error
|
||||
writer, err = NewCompressingResponseWriter(httpWriter, encoding)
|
||||
if err != nil {
|
||||
log.Print("unable to install compressor: ", err)
|
||||
httpWriter.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handler.ServeHTTP(writer, httpRequest)
|
||||
}))
|
||||
}
|
||||
|
||||
// HandleWithFilter registers the handler for the given pattern.
|
||||
|
@ -319,7 +392,7 @@ func (c *Container) HandleWithFilter(pattern string, handler http.Handler) {
|
|||
}
|
||||
|
||||
chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) {
|
||||
handler.ServeHTTP(httpResponse, httpRequest)
|
||||
handler.ServeHTTP(resp, req.Request)
|
||||
}}
|
||||
chain.ProcessFilter(NewRequest(httpRequest), NewResponse(httpResponse))
|
||||
}
|
|
@ -18,9 +18,22 @@ import (
|
|||
// http://enable-cors.org/server.html
|
||||
// http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request
|
||||
type CrossOriginResourceSharing struct {
|
||||
ExposeHeaders []string // list of Header names
|
||||
AllowedHeaders []string // list of Header names
|
||||
AllowedDomains []string // list of allowed values for Http Origin. An allowed value can be a regular expression to support subdomain matching. If empty all are allowed.
|
||||
ExposeHeaders []string // list of Header names
|
||||
|
||||
// AllowedHeaders is alist of Header names. Checking is case-insensitive.
|
||||
// The list may contain the special wildcard string ".*" ; all is allowed
|
||||
AllowedHeaders []string
|
||||
|
||||
// AllowedDomains is a list of allowed values for Http Origin.
|
||||
// The list may contain the special wildcard string ".*" ; all is allowed
|
||||
// If empty all are allowed.
|
||||
AllowedDomains []string
|
||||
|
||||
// AllowedDomainFunc is optional and is a function that will do the check
|
||||
// when the origin is not part of the AllowedDomains and it does not contain the wildcard ".*".
|
||||
AllowedDomainFunc func(origin string) bool
|
||||
|
||||
// AllowedMethods is either empty or has a list of http methods names. Checking is case-insensitive.
|
||||
AllowedMethods []string
|
||||
MaxAge int // number of seconds before requiring new Options request
|
||||
CookiesAllowed bool
|
||||
|
@ -119,36 +132,24 @@ func (c CrossOriginResourceSharing) isOriginAllowed(origin string) bool {
|
|||
if len(origin) == 0 {
|
||||
return false
|
||||
}
|
||||
lowerOrigin := strings.ToLower(origin)
|
||||
if len(c.AllowedDomains) == 0 {
|
||||
if c.AllowedDomainFunc != nil {
|
||||
return c.AllowedDomainFunc(lowerOrigin)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
allowed := false
|
||||
// exact match on each allowed domain
|
||||
for _, domain := range c.AllowedDomains {
|
||||
if domain == origin {
|
||||
allowed = true
|
||||
break
|
||||
if domain == ".*" || strings.ToLower(domain) == lowerOrigin {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
if !allowed {
|
||||
if len(c.allowedOriginPatterns) == 0 {
|
||||
// compile allowed domains to allowed origin patterns
|
||||
allowedOriginRegexps, err := compileRegexps(c.AllowedDomains)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
c.allowedOriginPatterns = allowedOriginRegexps
|
||||
}
|
||||
|
||||
for _, pattern := range c.allowedOriginPatterns {
|
||||
if allowed = pattern.MatchString(origin); allowed {
|
||||
break
|
||||
}
|
||||
}
|
||||
if c.AllowedDomainFunc != nil {
|
||||
return c.AllowedDomainFunc(origin)
|
||||
}
|
||||
|
||||
return allowed
|
||||
return false
|
||||
}
|
||||
|
||||
func (c CrossOriginResourceSharing) setAllowOriginHeader(req *Request, resp *Response) {
|
||||
|
@ -184,19 +185,9 @@ func (c CrossOriginResourceSharing) isValidAccessControlRequestHeader(header str
|
|||
if strings.ToLower(each) == strings.ToLower(header) {
|
||||
return true
|
||||
}
|
||||
if each == "*" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Take a list of strings and compile them into a list of regular expressions.
|
||||
func compileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
|
||||
regexps := []*regexp.Regexp{}
|
||||
for _, regexpStr := range regexpStrings {
|
||||
r, err := regexp.Compile(regexpStr)
|
||||
if err != nil {
|
||||
return regexps, err
|
||||
}
|
||||
regexps = append(regexps, r)
|
||||
}
|
||||
return regexps, nil
|
||||
}
|
|
@ -47,7 +47,7 @@ func (c CurlyRouter) SelectRoute(
|
|||
func (c CurlyRouter) selectRoutes(ws *WebService, requestTokens []string) sortableCurlyRoutes {
|
||||
candidates := make(sortableCurlyRoutes, 0, 8)
|
||||
for _, each := range ws.routes {
|
||||
matches, paramCount, staticCount := c.matchesRouteByPathTokens(each.pathParts, requestTokens)
|
||||
matches, paramCount, staticCount := c.matchesRouteByPathTokens(each.pathParts, requestTokens, each.hasCustomVerb)
|
||||
if matches {
|
||||
candidates.add(curlyRoute{each, paramCount, staticCount}) // TODO make sure Routes() return pointers?
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ func (c CurlyRouter) selectRoutes(ws *WebService, requestTokens []string) sortab
|
|||
}
|
||||
|
||||
// matchesRouteByPathTokens computes whether it matches, howmany parameters do match and what the number of static path elements are.
|
||||
func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []string) (matches bool, paramCount int, staticCount int) {
|
||||
func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []string, routeHasCustomVerb bool) (matches bool, paramCount int, staticCount int) {
|
||||
if len(routeTokens) < len(requestTokens) {
|
||||
// proceed in matching only if last routeToken is wildcard
|
||||
count := len(routeTokens)
|
||||
|
@ -72,6 +72,15 @@ func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []strin
|
|||
return false, 0, 0
|
||||
}
|
||||
requestToken := requestTokens[i]
|
||||
if routeHasCustomVerb && hasCustomVerb(routeToken){
|
||||
if !isMatchCustomVerb(routeToken, requestToken) {
|
||||
return false, 0, 0
|
||||
}
|
||||
staticCount++
|
||||
requestToken = removeCustomVerb(requestToken)
|
||||
routeToken = removeCustomVerb(routeToken)
|
||||
}
|
||||
|
||||
if strings.HasPrefix(routeToken, "{") {
|
||||
paramCount++
|
||||
if colon := strings.Index(routeToken, ":"); colon != -1 {
|
|
@ -0,0 +1,29 @@
|
|||
package restful
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
customVerbReg = regexp.MustCompile(":([A-Za-z]+)$")
|
||||
)
|
||||
|
||||
func hasCustomVerb(routeToken string) bool {
|
||||
return customVerbReg.MatchString(routeToken)
|
||||
}
|
||||
|
||||
func isMatchCustomVerb(routeToken string, pathToken string) bool {
|
||||
rs := customVerbReg.FindStringSubmatch(routeToken)
|
||||
if len(rs) < 2 {
|
||||
return false
|
||||
}
|
||||
|
||||
customVerb := rs[1]
|
||||
specificVerbReg := regexp.MustCompile(fmt.Sprintf(":%s$", customVerb))
|
||||
return specificVerbReg.MatchString(pathToken)
|
||||
}
|
||||
|
||||
func removeCustomVerb(str string) string {
|
||||
return customVerbReg.ReplaceAllString(str, "")
|
||||
}
|
|
@ -28,7 +28,7 @@ This package has the logic to find the best matching Route and if found, call it
|
|||
|
||||
The (*Request, *Response) arguments provide functions for reading information from the request and writing information back to the response.
|
||||
|
||||
See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-user-resource.go with a full implementation.
|
||||
See the example https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go with a full implementation.
|
||||
|
||||
Regular expression matching Routes
|
||||
|
||||
|
@ -82,7 +82,7 @@ These are processed before calling the function associated with the Route.
|
|||
// install 2 chained route filters (processed before calling findUser)
|
||||
ws.Route(ws.GET("/{user-id}").Filter(routeLogging).Filter(NewCountFilter().routeCounter).To(findUser))
|
||||
|
||||
See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-filters.go with full implementations.
|
||||
See the example https://github.com/emicklei/go-restful/blob/v3/examples/filters/restful-filters.go with full implementations.
|
||||
|
||||
Response Encoding
|
||||
|
||||
|
@ -93,7 +93,7 @@ Two encodings are supported: gzip and deflate. To enable this for all responses:
|
|||
If a Http request includes the Accept-Encoding header then the response content will be compressed using the specified encoding.
|
||||
Alternatively, you can create a Filter that performs the encoding and install it per WebService or Route.
|
||||
|
||||
See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-encoding-filter.go
|
||||
See the example https://github.com/emicklei/go-restful/blob/v3/examples/encoding/restful-encoding-filter.go
|
||||
|
||||
OPTIONS support
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package restful
|
||||
|
||||
// Copyright 2021 Ernest Micklei. All rights reserved.
|
||||
// Use of this source code is governed by a license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
// ExtensionProperties provides storage of vendor extensions for entities
|
||||
type ExtensionProperties struct {
|
||||
// Extensions vendor extensions used to describe extra functionality
|
||||
// (https://swagger.io/docs/specification/2-0/swagger-extensions/)
|
||||
Extensions map[string]interface{}
|
||||
}
|
||||
|
||||
// AddExtension adds or updates a key=value pair to the extension map.
|
||||
func (ep *ExtensionProperties) AddExtension(key string, value interface{}) {
|
||||
if ep.Extensions == nil {
|
||||
ep.Extensions = map[string]interface{}{key: value}
|
||||
} else {
|
||||
ep.Extensions[key] = value
|
||||
}
|
||||
}
|
|
@ -6,9 +6,11 @@ package restful
|
|||
|
||||
// FilterChain is a request scoped object to process one or more filters before calling the target RouteFunction.
|
||||
type FilterChain struct {
|
||||
Filters []FilterFunction // ordered list of FilterFunction
|
||||
Index int // index into filters that is currently in progress
|
||||
Target RouteFunction // function to call after passing all filters
|
||||
Filters []FilterFunction // ordered list of FilterFunction
|
||||
Index int // index into filters that is currently in progress
|
||||
Target RouteFunction // function to call after passing all filters
|
||||
ParameterDocs []*Parameter // the parameter docs for the route
|
||||
Operation string // the name of the operation
|
||||
}
|
||||
|
||||
// ProcessFilter passes the request,response pair through the next of Filters.
|
|
@ -9,6 +9,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// RouterJSR311 implements the flow for matching Requests to Routes (and consequently Resource Functions)
|
||||
|
@ -98,7 +99,18 @@ func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*R
|
|||
if trace {
|
||||
traceLogger.Printf("no Route found (in %d routes) that matches HTTP method %s\n", len(previous), httpRequest.Method)
|
||||
}
|
||||
return nil, NewError(http.StatusMethodNotAllowed, "405: Method Not Allowed")
|
||||
allowed := []string{}
|
||||
allowedLoop:
|
||||
for _, candidate := range previous {
|
||||
for _, method := range allowed {
|
||||
if method == candidate.Method {
|
||||
continue allowedLoop
|
||||
}
|
||||
}
|
||||
allowed = append(allowed, candidate.Method)
|
||||
}
|
||||
header := http.Header{"Allow": []string{strings.Join(allowed, ", ")}}
|
||||
return nil, NewErrorWithHeader(http.StatusMethodNotAllowed, "405: Method Not Allowed", header)
|
||||
}
|
||||
|
||||
// content-type
|
||||
|
@ -135,7 +147,24 @@ func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*R
|
|||
if trace {
|
||||
traceLogger.Printf("no Route found (from %d) that matches HTTP Accept: %s\n", len(previous), accept)
|
||||
}
|
||||
return nil, NewError(http.StatusNotAcceptable, "406: Not Acceptable")
|
||||
available := []string{}
|
||||
for _, candidate := range previous {
|
||||
available = append(available, candidate.Produces...)
|
||||
}
|
||||
// if POST,PUT,PATCH without body
|
||||
method, length := httpRequest.Method, httpRequest.Header.Get("Content-Length")
|
||||
if (method == http.MethodPost ||
|
||||
method == http.MethodPut ||
|
||||
method == http.MethodPatch) && length == "" {
|
||||
return nil, NewError(
|
||||
http.StatusUnsupportedMediaType,
|
||||
fmt.Sprintf("415: Unsupported Media Type\n\nAvailable representations: %s", strings.Join(available, ", ")),
|
||||
)
|
||||
}
|
||||
return nil, NewError(
|
||||
http.StatusNotAcceptable,
|
||||
fmt.Sprintf("406: Not Acceptable\n\nAvailable representations: %s", strings.Join(available, ", ")),
|
||||
)
|
||||
}
|
||||
// return r.bestMatchByMedia(outputMediaOk, contentType, accept), nil
|
||||
return candidates[0], nil
|
|
@ -4,7 +4,7 @@ package restful
|
|||
// Use of this source code is governed by a license
|
||||
// that can be found in the LICENSE file.
|
||||
import (
|
||||
"github.com/emicklei/go-restful/log"
|
||||
"github.com/emicklei/go-restful/v3/log"
|
||||
)
|
||||
|
||||
var trace bool = false
|
|
@ -1,5 +1,7 @@
|
|||
package restful
|
||||
|
||||
import "sort"
|
||||
|
||||
// Copyright 2013 Ernest Micklei. All rights reserved.
|
||||
// Use of this source code is governed by a license
|
||||
// that can be found in the LICENSE file.
|
||||
|
@ -52,13 +54,25 @@ type Parameter struct {
|
|||
// ParameterData represents the state of a Parameter.
|
||||
// It is made public to make it accessible to e.g. the Swagger package.
|
||||
type ParameterData struct {
|
||||
ExtensionProperties
|
||||
Name, Description, DataType, DataFormat string
|
||||
Kind int
|
||||
Required bool
|
||||
AllowableValues map[string]string
|
||||
AllowMultiple bool
|
||||
DefaultValue string
|
||||
CollectionFormat string
|
||||
// AllowableValues is deprecated. Use PossibleValues instead
|
||||
AllowableValues map[string]string
|
||||
PossibleValues []string
|
||||
AllowMultiple bool
|
||||
AllowEmptyValue bool
|
||||
DefaultValue string
|
||||
CollectionFormat string
|
||||
Pattern string
|
||||
Minimum *float64
|
||||
Maximum *float64
|
||||
MinLength *int64
|
||||
MaxLength *int64
|
||||
MinItems *int64
|
||||
MaxItems *int64
|
||||
UniqueItems bool
|
||||
}
|
||||
|
||||
// Data returns the state of the Parameter
|
||||
|
@ -106,9 +120,38 @@ func (p *Parameter) AllowMultiple(multiple bool) *Parameter {
|
|||
return p
|
||||
}
|
||||
|
||||
// AllowableValues sets the allowableValues field and returns the receiver
|
||||
// AddExtension adds or updates a key=value pair to the extension map
|
||||
func (p *Parameter) AddExtension(key string, value interface{}) *Parameter {
|
||||
p.data.AddExtension(key, value)
|
||||
return p
|
||||
}
|
||||
|
||||
// AllowEmptyValue sets the AllowEmptyValue field and returns the receiver
|
||||
func (p *Parameter) AllowEmptyValue(multiple bool) *Parameter {
|
||||
p.data.AllowEmptyValue = multiple
|
||||
return p
|
||||
}
|
||||
|
||||
// AllowableValues is deprecated. Use PossibleValues instead. Both will be set.
|
||||
func (p *Parameter) AllowableValues(values map[string]string) *Parameter {
|
||||
p.data.AllowableValues = values
|
||||
|
||||
allowableSortedKeys := make([]string, 0, len(values))
|
||||
for k := range values {
|
||||
allowableSortedKeys = append(allowableSortedKeys, k)
|
||||
}
|
||||
sort.Strings(allowableSortedKeys)
|
||||
|
||||
p.data.PossibleValues = make([]string, 0, len(values))
|
||||
for _, k := range allowableSortedKeys {
|
||||
p.data.PossibleValues = append(p.data.PossibleValues, values[k])
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
// PossibleValues sets the possible values field and returns the receiver
|
||||
func (p *Parameter) PossibleValues(values []string) *Parameter {
|
||||
p.data.PossibleValues = values
|
||||
return p
|
||||
}
|
||||
|
||||
|
@ -141,3 +184,51 @@ func (p *Parameter) CollectionFormat(format CollectionFormat) *Parameter {
|
|||
p.data.CollectionFormat = format.String()
|
||||
return p
|
||||
}
|
||||
|
||||
// Pattern sets the pattern field and returns the receiver
|
||||
func (p *Parameter) Pattern(pattern string) *Parameter {
|
||||
p.data.Pattern = pattern
|
||||
return p
|
||||
}
|
||||
|
||||
// Minimum sets the minimum field and returns the receiver
|
||||
func (p *Parameter) Minimum(minimum float64) *Parameter {
|
||||
p.data.Minimum = &minimum
|
||||
return p
|
||||
}
|
||||
|
||||
// Maximum sets the maximum field and returns the receiver
|
||||
func (p *Parameter) Maximum(maximum float64) *Parameter {
|
||||
p.data.Maximum = &maximum
|
||||
return p
|
||||
}
|
||||
|
||||
// MinLength sets the minLength field and returns the receiver
|
||||
func (p *Parameter) MinLength(minLength int64) *Parameter {
|
||||
p.data.MinLength = &minLength
|
||||
return p
|
||||
}
|
||||
|
||||
// MaxLength sets the maxLength field and returns the receiver
|
||||
func (p *Parameter) MaxLength(maxLength int64) *Parameter {
|
||||
p.data.MaxLength = &maxLength
|
||||
return p
|
||||
}
|
||||
|
||||
// MinItems sets the minItems field and returns the receiver
|
||||
func (p *Parameter) MinItems(minItems int64) *Parameter {
|
||||
p.data.MinItems = &minItems
|
||||
return p
|
||||
}
|
||||
|
||||
// MaxItems sets the maxItems field and returns the receiver
|
||||
func (p *Parameter) MaxItems(maxItems int64) *Parameter {
|
||||
p.data.MaxItems = &maxItems
|
||||
return p
|
||||
}
|
||||
|
||||
// UniqueItems sets the uniqueItems field and returns the receiver
|
||||
func (p *Parameter) UniqueItems(uniqueItems bool) *Parameter {
|
||||
p.data.UniqueItems = uniqueItems
|
||||
return p
|
||||
}
|
|
@ -29,7 +29,12 @@ func (d defaultPathProcessor) ExtractParameters(r *Route, _ *WebService, urlPath
|
|||
} else {
|
||||
value = urlParts[i]
|
||||
}
|
||||
if strings.HasPrefix(key, "{") { // path-parameter
|
||||
if r.hasCustomVerb && hasCustomVerb(key) {
|
||||
key = removeCustomVerb(key)
|
||||
value = removeCustomVerb(value)
|
||||
}
|
||||
|
||||
if strings.Index(key, "{") > -1 { // path-parameter
|
||||
if colon := strings.Index(key, ":"); colon != -1 {
|
||||
// extract by regex
|
||||
regPart := key[colon+1 : len(key)-1]
|
||||
|
@ -42,7 +47,13 @@ func (d defaultPathProcessor) ExtractParameters(r *Route, _ *WebService, urlPath
|
|||
}
|
||||
} else {
|
||||
// without enclosing {}
|
||||
pathParameters[key[1:len(key)-1]] = value
|
||||
startIndex := strings.Index(key, "{")
|
||||
endKeyIndex := strings.Index(key, "}")
|
||||
|
||||
suffixLength := len(key) - endKeyIndex - 1
|
||||
endValueIndex := len(value) - suffixLength
|
||||
|
||||
pathParameters[key[startIndex+1:endKeyIndex]] = value[startIndex:endValueIndex]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,10 +13,10 @@ var defaultRequestContentType string
|
|||
|
||||
// Request is a wrapper for a http Request that provides convenience methods
|
||||
type Request struct {
|
||||
Request *http.Request
|
||||
pathParameters map[string]string
|
||||
attributes map[string]interface{} // for storing request-scoped values
|
||||
selectedRoutePath string // root path + route path that matched the request, e.g. /meetings/{id}/attendees
|
||||
Request *http.Request
|
||||
pathParameters map[string]string
|
||||
attributes map[string]interface{} // for storing request-scoped values
|
||||
selectedRoute *Route // is nil when no route was matched
|
||||
}
|
||||
|
||||
func NewRequest(httpRequest *http.Request) *Request {
|
||||
|
@ -113,6 +113,20 @@ func (r Request) Attribute(name string) interface{} {
|
|||
}
|
||||
|
||||
// SelectedRoutePath root path + route path that matched the request, e.g. /meetings/{id}/attendees
|
||||
// If no route was matched then return an empty string.
|
||||
func (r Request) SelectedRoutePath() string {
|
||||
return r.selectedRoutePath
|
||||
if r.selectedRoute == nil {
|
||||
return ""
|
||||
}
|
||||
// skip creating an accessor
|
||||
return r.selectedRoute.Path
|
||||
}
|
||||
|
||||
// SelectedRoute returns a reader to access the selected Route by the container
|
||||
// Returns nil if no route was matched.
|
||||
func (r Request) SelectedRoute() RouteReader {
|
||||
if r.selectedRoute == nil {
|
||||
return nil
|
||||
}
|
||||
return routeAccessor{route: r.selectedRoute}
|
||||
}
|
|
@ -174,15 +174,16 @@ func (r *Response) WriteHeaderAndJson(status int, value interface{}, contentType
|
|||
return writeJSON(r, status, contentType, value)
|
||||
}
|
||||
|
||||
// WriteError write the http status and the error string on the response. err can be nil.
|
||||
func (r *Response) WriteError(httpStatus int, err error) error {
|
||||
// WriteError writes the http status and the error string on the response. err can be nil.
|
||||
// Return an error if writing was not successful.
|
||||
func (r *Response) WriteError(httpStatus int, err error) (writeErr error) {
|
||||
r.err = err
|
||||
if err == nil {
|
||||
r.WriteErrorString(httpStatus, "")
|
||||
writeErr = r.WriteErrorString(httpStatus, "")
|
||||
} else {
|
||||
r.WriteErrorString(httpStatus, err.Error())
|
||||
writeErr = r.WriteErrorString(httpStatus, err.Error())
|
||||
}
|
||||
return err
|
||||
return writeErr
|
||||
}
|
||||
|
||||
// WriteServiceError is a convenience method for a responding with a status and a ServiceError
|
|
@ -19,6 +19,7 @@ type RouteSelectionConditionFunction func(httpRequest *http.Request) bool
|
|||
|
||||
// Route binds a HTTP Method,Path,Consumes combination to a RouteFunction.
|
||||
type Route struct {
|
||||
ExtensionProperties
|
||||
Method string
|
||||
Produces []string
|
||||
Consumes []string
|
||||
|
@ -49,35 +50,33 @@ type Route struct {
|
|||
|
||||
//Overrides the container.contentEncodingEnabled
|
||||
contentEncodingEnabled *bool
|
||||
|
||||
// indicate route path has custom verb
|
||||
hasCustomVerb bool
|
||||
|
||||
// if a request does not include a content-type header then
|
||||
// depending on the method, it may return a 415 Unsupported Media
|
||||
// Must have uppercase HTTP Method names such as GET,HEAD,OPTIONS,...
|
||||
allowedMethodsWithoutContentType []string
|
||||
}
|
||||
|
||||
// Initialize for Route
|
||||
func (r *Route) postBuild() {
|
||||
r.pathParts = tokenizePath(r.Path)
|
||||
r.hasCustomVerb = hasCustomVerb(r.Path)
|
||||
}
|
||||
|
||||
// Create Request and Response from their http versions
|
||||
func (r *Route) wrapRequestResponse(httpWriter http.ResponseWriter, httpRequest *http.Request, pathParams map[string]string) (*Request, *Response) {
|
||||
wrappedRequest := NewRequest(httpRequest)
|
||||
wrappedRequest.pathParameters = pathParams
|
||||
wrappedRequest.selectedRoutePath = r.Path
|
||||
wrappedRequest.selectedRoute = r
|
||||
wrappedResponse := NewResponse(httpWriter)
|
||||
wrappedResponse.requestAccept = httpRequest.Header.Get(HEADER_Accept)
|
||||
wrappedResponse.routeProduces = r.Produces
|
||||
return wrappedRequest, wrappedResponse
|
||||
}
|
||||
|
||||
// dispatchWithFilters call the function after passing through its own filters
|
||||
func (r *Route) dispatchWithFilters(wrappedRequest *Request, wrappedResponse *Response) {
|
||||
if len(r.Filters) > 0 {
|
||||
chain := FilterChain{Filters: r.Filters, Target: r.Function}
|
||||
chain.ProcessFilter(wrappedRequest, wrappedResponse)
|
||||
} else {
|
||||
// unfiltered
|
||||
r.Function(wrappedRequest, wrappedResponse)
|
||||
}
|
||||
}
|
||||
|
||||
func stringTrimSpaceCutset(r rune) bool {
|
||||
return r == ' '
|
||||
}
|
||||
|
@ -121,8 +120,17 @@ func (r Route) matchesContentType(mimeTypes string) bool {
|
|||
if len(mimeTypes) == 0 {
|
||||
// idempotent methods with (most-likely or guaranteed) empty content match missing Content-Type
|
||||
m := r.Method
|
||||
if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" {
|
||||
return true
|
||||
// if route specifies less or non-idempotent methods then use that
|
||||
if len(r.allowedMethodsWithoutContentType) > 0 {
|
||||
for _, each := range r.allowedMethodsWithoutContentType {
|
||||
if m == each {
|
||||
return true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
// proceed with default
|
||||
mimeTypes = MIME_OCTET
|
||||
|
@ -160,11 +168,11 @@ func tokenizePath(path string) []string {
|
|||
}
|
||||
|
||||
// for debugging
|
||||
func (r Route) String() string {
|
||||
func (r *Route) String() string {
|
||||
return r.Method + " " + r.Path
|
||||
}
|
||||
|
||||
// EnableContentEncoding (default=false) allows for GZIP or DEFLATE encoding of responses. Overrides the container.contentEncodingEnabled value.
|
||||
func (r Route) EnableContentEncoding(enabled bool) {
|
||||
func (r *Route) EnableContentEncoding(enabled bool) {
|
||||
r.contentEncodingEnabled = &enabled
|
||||
}
|
|
@ -12,19 +12,20 @@ import (
|
|||
"strings"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/emicklei/go-restful/log"
|
||||
"github.com/emicklei/go-restful/v3/log"
|
||||
)
|
||||
|
||||
// RouteBuilder is a helper to construct Routes.
|
||||
type RouteBuilder struct {
|
||||
rootPath string
|
||||
currentPath string
|
||||
produces []string
|
||||
consumes []string
|
||||
httpMethod string // required
|
||||
function RouteFunction // required
|
||||
filters []FilterFunction
|
||||
conditions []RouteSelectionConditionFunction
|
||||
rootPath string
|
||||
currentPath string
|
||||
produces []string
|
||||
consumes []string
|
||||
httpMethod string // required
|
||||
function RouteFunction // required
|
||||
filters []FilterFunction
|
||||
conditions []RouteSelectionConditionFunction
|
||||
allowedMethodsWithoutContentType []string // see Route
|
||||
|
||||
typeNameHandleFunc TypeNameHandleFunction // required
|
||||
|
||||
|
@ -37,6 +38,7 @@ type RouteBuilder struct {
|
|||
errorMap map[int]ResponseError
|
||||
defaultResponse *ResponseError
|
||||
metadata map[string]interface{}
|
||||
extensions map[string]interface{}
|
||||
deprecated bool
|
||||
contentEncodingEnabled *bool
|
||||
}
|
||||
|
@ -176,6 +178,15 @@ func (b *RouteBuilder) Returns(code int, message string, model interface{}) *Rou
|
|||
return b
|
||||
}
|
||||
|
||||
// ReturnsWithHeaders is similar to Returns, but can specify response headers
|
||||
func (b *RouteBuilder) ReturnsWithHeaders(code int, message string, model interface{}, headers map[string]Header) *RouteBuilder {
|
||||
b.Returns(code, message, model)
|
||||
err := b.errorMap[code]
|
||||
err.Headers = headers
|
||||
b.errorMap[code] = err
|
||||
return b
|
||||
}
|
||||
|
||||
// DefaultReturns is a special Returns call that sets the default of the response.
|
||||
func (b *RouteBuilder) DefaultReturns(message string, model interface{}) *RouteBuilder {
|
||||
b.defaultResponse = &ResponseError{
|
||||
|
@ -194,20 +205,57 @@ func (b *RouteBuilder) Metadata(key string, value interface{}) *RouteBuilder {
|
|||
return b
|
||||
}
|
||||
|
||||
// AddExtension adds or updates a key=value pair to the extensions map.
|
||||
func (b *RouteBuilder) AddExtension(key string, value interface{}) *RouteBuilder {
|
||||
if b.extensions == nil {
|
||||
b.extensions = map[string]interface{}{}
|
||||
}
|
||||
b.extensions[key] = value
|
||||
return b
|
||||
}
|
||||
|
||||
// Deprecate sets the value of deprecated to true. Deprecated routes have a special UI treatment to warn against use
|
||||
func (b *RouteBuilder) Deprecate() *RouteBuilder {
|
||||
b.deprecated = true
|
||||
return b
|
||||
}
|
||||
|
||||
// AllowedMethodsWithoutContentType overrides the default list GET,HEAD,OPTIONS,DELETE,TRACE
|
||||
// If a request does not include a content-type header then
|
||||
// depending on the method, it may return a 415 Unsupported Media.
|
||||
// Must have uppercase HTTP Method names such as GET,HEAD,OPTIONS,...
|
||||
func (b *RouteBuilder) AllowedMethodsWithoutContentType(methods []string) *RouteBuilder {
|
||||
b.allowedMethodsWithoutContentType = methods
|
||||
return b
|
||||
}
|
||||
|
||||
// ResponseError represents a response; not necessarily an error.
|
||||
type ResponseError struct {
|
||||
ExtensionProperties
|
||||
Code int
|
||||
Message string
|
||||
Model interface{}
|
||||
Headers map[string]Header
|
||||
IsDefault bool
|
||||
}
|
||||
|
||||
// Header describes a header for a response of the API
|
||||
//
|
||||
// For more information: http://goo.gl/8us55a#headerObject
|
||||
type Header struct {
|
||||
*Items
|
||||
Description string
|
||||
}
|
||||
|
||||
// Items describe swagger simple schemas for headers
|
||||
type Items struct {
|
||||
Type string
|
||||
Format string
|
||||
Items *Items
|
||||
CollectionFormat string
|
||||
Default interface{}
|
||||
}
|
||||
|
||||
func (b *RouteBuilder) servicePath(path string) *RouteBuilder {
|
||||
b.rootPath = path
|
||||
return b
|
||||
|
@ -276,27 +324,29 @@ func (b *RouteBuilder) Build() Route {
|
|||
operationName = nameOfFunction(b.function)
|
||||
}
|
||||
route := Route{
|
||||
Method: b.httpMethod,
|
||||
Path: concatPath(b.rootPath, b.currentPath),
|
||||
Produces: b.produces,
|
||||
Consumes: b.consumes,
|
||||
Function: b.function,
|
||||
Filters: b.filters,
|
||||
If: b.conditions,
|
||||
relativePath: b.currentPath,
|
||||
pathExpr: pathExpr,
|
||||
Doc: b.doc,
|
||||
Notes: b.notes,
|
||||
Operation: operationName,
|
||||
ParameterDocs: b.parameters,
|
||||
ResponseErrors: b.errorMap,
|
||||
DefaultResponse: b.defaultResponse,
|
||||
ReadSample: b.readSample,
|
||||
WriteSample: b.writeSample,
|
||||
Metadata: b.metadata,
|
||||
Deprecated: b.deprecated,
|
||||
contentEncodingEnabled: b.contentEncodingEnabled,
|
||||
Method: b.httpMethod,
|
||||
Path: concatPath(b.rootPath, b.currentPath),
|
||||
Produces: b.produces,
|
||||
Consumes: b.consumes,
|
||||
Function: b.function,
|
||||
Filters: b.filters,
|
||||
If: b.conditions,
|
||||
relativePath: b.currentPath,
|
||||
pathExpr: pathExpr,
|
||||
Doc: b.doc,
|
||||
Notes: b.notes,
|
||||
Operation: operationName,
|
||||
ParameterDocs: b.parameters,
|
||||
ResponseErrors: b.errorMap,
|
||||
DefaultResponse: b.defaultResponse,
|
||||
ReadSample: b.readSample,
|
||||
WriteSample: b.writeSample,
|
||||
Metadata: b.metadata,
|
||||
Deprecated: b.deprecated,
|
||||
contentEncodingEnabled: b.contentEncodingEnabled,
|
||||
allowedMethodsWithoutContentType: b.allowedMethodsWithoutContentType,
|
||||
}
|
||||
route.Extensions = b.extensions
|
||||
route.postBuild()
|
||||
return route
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package restful
|
||||
|
||||
// Copyright 2021 Ernest Micklei. All rights reserved.
|
||||
// Use of this source code is governed by a license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
type RouteReader interface {
|
||||
Method() string
|
||||
Consumes() []string
|
||||
Path() string
|
||||
Doc() string
|
||||
Notes() string
|
||||
Operation() string
|
||||
ParameterDocs() []*Parameter
|
||||
// Returns a copy
|
||||
Metadata() map[string]interface{}
|
||||
Deprecated() bool
|
||||
}
|
||||
|
||||
type routeAccessor struct {
|
||||
route *Route
|
||||
}
|
||||
|
||||
func (r routeAccessor) Method() string {
|
||||
return r.route.Method
|
||||
}
|
||||
func (r routeAccessor) Consumes() []string {
|
||||
return r.route.Consumes[:]
|
||||
}
|
||||
func (r routeAccessor) Path() string {
|
||||
return r.route.Path
|
||||
}
|
||||
func (r routeAccessor) Doc() string {
|
||||
return r.route.Doc
|
||||
}
|
||||
func (r routeAccessor) Notes() string {
|
||||
return r.route.Notes
|
||||
}
|
||||
func (r routeAccessor) Operation() string {
|
||||
return r.route.Operation
|
||||
}
|
||||
func (r routeAccessor) ParameterDocs() []*Parameter {
|
||||
return r.route.ParameterDocs[:]
|
||||
}
|
||||
|
||||
// Returns a copy
|
||||
func (r routeAccessor) Metadata() map[string]interface{} {
|
||||
return copyMap(r.route.Metadata)
|
||||
}
|
||||
func (r routeAccessor) Deprecated() bool {
|
||||
return r.route.Deprecated
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/23057785/how-to-copy-a-map
|
||||
func copyMap(m map[string]interface{}) map[string]interface{} {
|
||||
cp := make(map[string]interface{})
|
||||
for k, v := range m {
|
||||
vm, ok := v.(map[string]interface{})
|
||||
if ok {
|
||||
cp[k] = copyMap(vm)
|
||||
} else {
|
||||
cp[k] = v
|
||||
}
|
||||
}
|
||||
return cp
|
||||
}
|
|
@ -4,12 +4,16 @@ package restful
|
|||
// Use of this source code is governed by a license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ServiceError is a transport object to pass information about a non-Http error occurred in a WebService while processing a request.
|
||||
type ServiceError struct {
|
||||
Code int
|
||||
Message string
|
||||
Header http.Header
|
||||
}
|
||||
|
||||
// NewError returns a ServiceError using the code and reason
|
||||
|
@ -17,6 +21,11 @@ func NewError(code int, message string) ServiceError {
|
|||
return ServiceError{Code: code, Message: message}
|
||||
}
|
||||
|
||||
// NewErrorWithHeader returns a ServiceError using the code, reason and header
|
||||
func NewErrorWithHeader(code int, message string, header http.Header) ServiceError {
|
||||
return ServiceError{Code: code, Message: message, Header: header}
|
||||
}
|
||||
|
||||
// Error returns a text representation of the service error
|
||||
func (s ServiceError) Error() string {
|
||||
return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message)
|
|
@ -6,7 +6,7 @@ import (
|
|||
"reflect"
|
||||
"sync"
|
||||
|
||||
"github.com/emicklei/go-restful/log"
|
||||
"github.com/emicklei/go-restful/v3/log"
|
||||
)
|
||||
|
||||
// Copyright 2013 Ernest Micklei. All rights reserved.
|
||||
|
@ -176,22 +176,20 @@ func (w *WebService) Route(builder *RouteBuilder) *WebService {
|
|||
|
||||
// RemoveRoute removes the specified route, looks for something that matches 'path' and 'method'
|
||||
func (w *WebService) RemoveRoute(path, method string) error {
|
||||
if !w.dynamicRoutes {
|
||||
return errors.New("dynamic routes are not enabled.")
|
||||
}
|
||||
w.routesLock.Lock()
|
||||
defer w.routesLock.Unlock()
|
||||
newRoutes := make([]Route, (len(w.routes) - 1))
|
||||
current := 0
|
||||
for ix := range w.routes {
|
||||
if w.routes[ix].Method == method && w.routes[ix].Path == path {
|
||||
continue
|
||||
}
|
||||
newRoutes[current] = w.routes[ix]
|
||||
current = current + 1
|
||||
}
|
||||
w.routes = newRoutes
|
||||
return nil
|
||||
if !w.dynamicRoutes {
|
||||
return errors.New("dynamic routes are not enabled.")
|
||||
}
|
||||
w.routesLock.Lock()
|
||||
defer w.routesLock.Unlock()
|
||||
newRoutes := []Route{}
|
||||
for _, route := range w.routes {
|
||||
if route.Method == method && route.Path == path {
|
||||
continue
|
||||
}
|
||||
newRoutes = append(newRoutes, route)
|
||||
}
|
||||
w.routes = newRoutes
|
||||
return nil
|
||||
}
|
||||
|
||||
// Method creates a new RouteBuilder and initialize its http method
|
||||
|
@ -288,3 +286,8 @@ func (w *WebService) PATCH(subPath string) *RouteBuilder {
|
|||
func (w *WebService) DELETE(subPath string) *RouteBuilder {
|
||||
return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("DELETE").Path(subPath)
|
||||
}
|
||||
|
||||
// OPTIONS is a shortcut for .Method("OPTIONS").Path(subPath)
|
||||
func (w *WebService) OPTIONS(subPath string) *RouteBuilder {
|
||||
return new(RouteBuilder).typeNameHandler(w.typeNameHandleFunc).servicePath(w.rootPath).Method("OPTIONS").Path(subPath)
|
||||
}
|
|
@ -105,14 +105,18 @@ with higher verbosity means more (and less important) logs will be generated.
|
|||
There are implementations for the following logging libraries:
|
||||
|
||||
- **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr)
|
||||
- **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr)
|
||||
- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr)
|
||||
- **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr)
|
||||
- **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting)
|
||||
- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr)
|
||||
- **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr)
|
||||
- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr)
|
||||
- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend)
|
||||
- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr)
|
||||
- **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr)
|
||||
- **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0)
|
||||
- **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing)
|
||||
|
||||
## FAQ
|
||||
|
||||
|
|
|
@ -115,6 +115,15 @@ limitations under the License.
|
|||
// may be any Go value, but how the value is formatted is determined by the
|
||||
// LogSink implementation.
|
||||
//
|
||||
// Logger instances are meant to be passed around by value. Code that receives
|
||||
// such a value can call its methods without having to check whether the
|
||||
// instance is ready for use.
|
||||
//
|
||||
// Calling methods with the null logger (Logger{}) as instance will crash
|
||||
// because it has no LogSink. Therefore this null logger should never be passed
|
||||
// around. For cases where passing a logger is optional, a pointer to Logger
|
||||
// should be used.
|
||||
//
|
||||
// Key Naming Conventions
|
||||
//
|
||||
// Keys are not strictly required to conform to any specification or regex, but
|
||||
|
|
|
@ -36,11 +36,12 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/google/go-cmp/cmp/internal/diff"
|
||||
"github.com/google/go-cmp/cmp/internal/flags"
|
||||
"github.com/google/go-cmp/cmp/internal/function"
|
||||
"github.com/google/go-cmp/cmp/internal/value"
|
||||
)
|
||||
|
||||
// TODO(≥go1.18): Use any instead of interface{}.
|
||||
|
||||
// Equal reports whether x and y are equal by recursively applying the
|
||||
// following rules in the given order to x and y and all of their sub-values:
|
||||
//
|
||||
|
@ -319,7 +320,6 @@ func (s *state) tryMethod(t reflect.Type, vx, vy reflect.Value) bool {
|
|||
}
|
||||
|
||||
func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value {
|
||||
v = sanitizeValue(v, f.Type().In(0))
|
||||
if !s.dynChecker.Next() {
|
||||
return f.Call([]reflect.Value{v})[0]
|
||||
}
|
||||
|
@ -343,8 +343,6 @@ func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value {
|
|||
}
|
||||
|
||||
func (s *state) callTTBFunc(f, x, y reflect.Value) bool {
|
||||
x = sanitizeValue(x, f.Type().In(0))
|
||||
y = sanitizeValue(y, f.Type().In(1))
|
||||
if !s.dynChecker.Next() {
|
||||
return f.Call([]reflect.Value{x, y})[0].Bool()
|
||||
}
|
||||
|
@ -372,19 +370,6 @@ func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) {
|
|||
ret = f.Call(vs)[0]
|
||||
}
|
||||
|
||||
// sanitizeValue converts nil interfaces of type T to those of type R,
|
||||
// assuming that T is assignable to R.
|
||||
// Otherwise, it returns the input value as is.
|
||||
func sanitizeValue(v reflect.Value, t reflect.Type) reflect.Value {
|
||||
// TODO(≥go1.10): Workaround for reflect bug (https://golang.org/issue/22143).
|
||||
if !flags.AtLeastGo110 {
|
||||
if v.Kind() == reflect.Interface && v.IsNil() && v.Type() != t {
|
||||
return reflect.New(t).Elem()
|
||||
}
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) {
|
||||
var addr bool
|
||||
var vax, vay reflect.Value // Addressable versions of vx and vy
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego
|
||||
// +build purego
|
||||
|
||||
package cmp
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego
|
||||
// +build !purego
|
||||
|
||||
package cmp
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !cmp_debug
|
||||
// +build !cmp_debug
|
||||
|
||||
package diff
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build cmp_debug
|
||||
// +build cmp_debug
|
||||
|
||||
package diff
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
// Copyright 2019, 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.
|
||||
|
||||
// +build !go1.10
|
||||
|
||||
package flags
|
||||
|
||||
// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10.
|
||||
const AtLeastGo110 = false
|
|
@ -1,10 +0,0 @@
|
|||
// Copyright 2019, 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.
|
||||
|
||||
// +build go1.10
|
||||
|
||||
package flags
|
||||
|
||||
// AtLeastGo110 reports whether the Go toolchain is at least Go 1.10.
|
||||
const AtLeastGo110 = true
|
|
@ -9,6 +9,8 @@ import (
|
|||
"strconv"
|
||||
)
|
||||
|
||||
var anyType = reflect.TypeOf((*interface{})(nil)).Elem()
|
||||
|
||||
// TypeString is nearly identical to reflect.Type.String,
|
||||
// but has an additional option to specify that full type names be used.
|
||||
func TypeString(t reflect.Type, qualified bool) string {
|
||||
|
@ -20,6 +22,11 @@ func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte
|
|||
// of the same name and within the same package,
|
||||
// but declared within the namespace of different functions.
|
||||
|
||||
// Use the "any" alias instead of "interface{}" for better readability.
|
||||
if t == anyType {
|
||||
return append(b, "any"...)
|
||||
}
|
||||
|
||||
// Named type.
|
||||
if t.Name() != "" {
|
||||
if qualified && t.PkgPath() != "" {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build purego
|
||||
// +build purego
|
||||
|
||||
package value
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !purego
|
||||
// +build !purego
|
||||
|
||||
package value
|
||||
|
|
|
@ -178,7 +178,7 @@ type structField struct {
|
|||
unexported bool
|
||||
mayForce bool // Forcibly allow visibility
|
||||
paddr bool // Was parent addressable?
|
||||
pvx, pvy reflect.Value // Parent values (always addressible)
|
||||
pvx, pvy reflect.Value // Parent values (always addressable)
|
||||
field reflect.StructField // Field information
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,10 @@ func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out
|
|||
}
|
||||
|
||||
// For leaf nodes, format the value based on the reflect.Values alone.
|
||||
if v.MaxDepth == 0 {
|
||||
// As a special case, treat equal []byte as a leaf nodes.
|
||||
isBytes := v.Type.Kind() == reflect.Slice && v.Type.Elem() == reflect.TypeOf(byte(0))
|
||||
isEqualBytes := isBytes && v.NumDiff+v.NumIgnored+v.NumTransformed == 0
|
||||
if v.MaxDepth == 0 || isEqualBytes {
|
||||
switch opts.DiffMode {
|
||||
case diffUnknown, diffIdentical:
|
||||
// Format Equal.
|
||||
|
|
|
@ -207,10 +207,11 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind,
|
|||
// Check whether this is a []byte of text data.
|
||||
if t.Elem() == reflect.TypeOf(byte(0)) {
|
||||
b := v.Bytes()
|
||||
isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) && unicode.IsSpace(r) }
|
||||
isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) || unicode.IsSpace(r) }
|
||||
if len(b) > 0 && utf8.Valid(b) && len(bytes.TrimFunc(b, isPrintSpace)) == 0 {
|
||||
out = opts.formatString("", string(b))
|
||||
return opts.WithTypeMode(emitType).FormatType(t, out)
|
||||
skipType = true
|
||||
return opts.FormatType(t, out)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,7 +282,12 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind,
|
|||
}
|
||||
defer ptrs.Pop()
|
||||
|
||||
skipType = true // Let the underlying value print the type instead
|
||||
// Skip the name only if this is an unnamed pointer type.
|
||||
// Otherwise taking the address of a value does not reproduce
|
||||
// the named pointer type.
|
||||
if v.Type().Name() == "" {
|
||||
skipType = true // Let the underlying value print the type instead
|
||||
}
|
||||
out = opts.FormatValue(v.Elem(), t.Kind(), ptrs)
|
||||
out = wrapTrunkReference(ptrRef, opts.PrintAddresses, out)
|
||||
out = &textWrap{Prefix: "&", Value: out}
|
||||
|
@ -292,7 +298,6 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind,
|
|||
}
|
||||
// Interfaces accept different concrete types,
|
||||
// so configure the underlying value to explicitly print the type.
|
||||
skipType = true // Print the concrete type instead
|
||||
return opts.WithTypeMode(emitType).FormatValue(v.Elem(), t.Kind(), ptrs)
|
||||
default:
|
||||
panic(fmt.Sprintf("%v kind not handled", v.Kind()))
|
||||
|
|
|
@ -80,7 +80,7 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool {
|
|||
}
|
||||
|
||||
// Use specialized string diffing for longer slices or strings.
|
||||
const minLength = 64
|
||||
const minLength = 32
|
||||
return vx.Len() >= minLength && vy.Len() >= minLength
|
||||
}
|
||||
|
||||
|
@ -563,10 +563,10 @@ func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []d
|
|||
nx := ds.NumIdentical + ds.NumRemoved + ds.NumModified
|
||||
ny := ds.NumIdentical + ds.NumInserted + ds.NumModified
|
||||
var numLeadingIdentical, numTrailingIdentical int
|
||||
for i := 0; i < nx && i < ny && eq(ix+i, iy+i); i++ {
|
||||
for j := 0; j < nx && j < ny && eq(ix+j, iy+j); j++ {
|
||||
numLeadingIdentical++
|
||||
}
|
||||
for i := 0; i < nx && i < ny && eq(ix+nx-1-i, iy+ny-1-i); i++ {
|
||||
for j := 0; j < nx && j < ny && eq(ix+nx-1-j, iy+ny-1-j); j++ {
|
||||
numTrailingIdentical++
|
||||
}
|
||||
if numIdentical := numLeadingIdentical + numTrailingIdentical; numIdentical > 0 {
|
||||
|
|
|
@ -27,7 +27,7 @@ It is ready for production use. [It is used in several projects by Docker, Googl
|
|||
|
||||
### Latest release
|
||||
|
||||
[Release v0.3.4](https://github.com/imdario/mergo/releases/tag/v0.3.4).
|
||||
[Release v0.3.6](https://github.com/imdario/mergo/releases/tag/v0.3.6).
|
||||
|
||||
### Important note
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
package mergo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
|
@ -127,6 +128,9 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
|
|||
if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice {
|
||||
dstSlice = srcSlice
|
||||
} else if config.AppendSlice {
|
||||
if srcSlice.Type() != dstSlice.Type() {
|
||||
return fmt.Errorf("cannot append two slice with different type (%s, %s)", srcSlice.Type(), dstSlice.Type())
|
||||
}
|
||||
dstSlice = reflect.AppendSlice(dstSlice, srcSlice)
|
||||
}
|
||||
dst.SetMapIndex(key, dstSlice)
|
||||
|
@ -150,6 +154,9 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
|
|||
if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice {
|
||||
dst.Set(src)
|
||||
} else if config.AppendSlice {
|
||||
if src.Type() != dst.Type() {
|
||||
return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type())
|
||||
}
|
||||
dst.Set(reflect.AppendSlice(dst, src))
|
||||
}
|
||||
case reflect.Ptr:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// but additional checking functions, most notably Check, verify that
|
||||
// a particular path, version pair is valid.
|
||||
//
|
||||
// Escaped Paths
|
||||
// # Escaped Paths
|
||||
//
|
||||
// Module paths appear as substrings of file system paths
|
||||
// (in the download cache) and of web server URLs in the proxy protocol.
|
||||
|
@ -55,7 +55,7 @@
|
|||
// Import paths have never allowed exclamation marks, so there is no
|
||||
// need to define how to escape a literal !.
|
||||
//
|
||||
// Unicode Restrictions
|
||||
// # Unicode Restrictions
|
||||
//
|
||||
// Today, paths are disallowed from using Unicode.
|
||||
//
|
||||
|
@ -102,9 +102,9 @@ import (
|
|||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
"errors"
|
||||
|
||||
"golang.org/x/mod/semver"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// A Version (for clients, a module.Version) is defined by a module path and version pair.
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
@ -21,9 +21,9 @@
|
|||
// explicitly to each function that needs it. The Context should be the first
|
||||
// parameter, typically named ctx:
|
||||
//
|
||||
// func DoSomething(ctx context.Context, arg Arg) error {
|
||||
// // ... use ctx ...
|
||||
// }
|
||||
// func DoSomething(ctx context.Context, arg Arg) error {
|
||||
// // ... use ctx ...
|
||||
// }
|
||||
//
|
||||
// Do not pass a nil Context, even if a function permits it. Pass context.TODO
|
||||
// if you are unsure about which Context to use.
|
||||
|
|
|
@ -54,11 +54,11 @@ func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
|
|||
// Canceling this context releases resources associated with it, so code should
|
||||
// call cancel as soon as the operations running in this Context complete:
|
||||
//
|
||||
// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
|
||||
// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||
// defer cancel() // releases resources if slowOperation completes before timeout elapses
|
||||
// return slowOperation(ctx)
|
||||
// }
|
||||
// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
|
||||
// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||
// defer cancel() // releases resources if slowOperation completes before timeout elapses
|
||||
// return slowOperation(ctx)
|
||||
// }
|
||||
func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
|
||||
return WithDeadline(parent, time.Now().Add(timeout))
|
||||
}
|
||||
|
|
|
@ -264,11 +264,11 @@ func (c *timerCtx) cancel(removeFromParent bool, err error) {
|
|||
// Canceling this context releases resources associated with it, so code should
|
||||
// call cancel as soon as the operations running in this Context complete:
|
||||
//
|
||||
// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
|
||||
// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||
// defer cancel() // releases resources if slowOperation completes before timeout elapses
|
||||
// return slowOperation(ctx)
|
||||
// }
|
||||
// func slowOperationWithTimeout(ctx context.Context) (Result, error) {
|
||||
// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||
// defer cancel() // releases resources if slowOperation completes before timeout elapses
|
||||
// return slowOperation(ctx)
|
||||
// }
|
||||
func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
|
||||
return WithDeadline(parent, time.Now().Add(timeout))
|
||||
}
|
||||
|
|
|
@ -173,13 +173,15 @@ func tokenEqual(t1, t2 string) bool {
|
|||
|
||||
// isLWS reports whether b is linear white space, according
|
||||
// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
|
||||
// LWS = [CRLF] 1*( SP | HT )
|
||||
//
|
||||
// LWS = [CRLF] 1*( SP | HT )
|
||||
func isLWS(b byte) bool { return b == ' ' || b == '\t' }
|
||||
|
||||
// isCTL reports whether b is a control byte, according
|
||||
// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
|
||||
// CTL = <any US-ASCII control character
|
||||
// (octets 0 - 31) and DEL (127)>
|
||||
//
|
||||
// CTL = <any US-ASCII control character
|
||||
// (octets 0 - 31) and DEL (127)>
|
||||
func isCTL(b byte) bool {
|
||||
const del = 0x7f // a CTL
|
||||
return b < ' ' || b == del
|
||||
|
@ -189,12 +191,13 @@ func isCTL(b byte) bool {
|
|||
// HTTP/2 imposes the additional restriction that uppercase ASCII
|
||||
// letters are not allowed.
|
||||
//
|
||||
// RFC 7230 says:
|
||||
// header-field = field-name ":" OWS field-value OWS
|
||||
// field-name = token
|
||||
// token = 1*tchar
|
||||
// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
|
||||
// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
|
||||
// RFC 7230 says:
|
||||
//
|
||||
// header-field = field-name ":" OWS field-value OWS
|
||||
// field-name = token
|
||||
// token = 1*tchar
|
||||
// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
|
||||
// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
|
||||
func ValidHeaderFieldName(v string) bool {
|
||||
if len(v) == 0 {
|
||||
return false
|
||||
|
@ -267,27 +270,28 @@ var validHostByte = [256]bool{
|
|||
// ValidHeaderFieldValue reports whether v is a valid "field-value" according to
|
||||
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 :
|
||||
//
|
||||
// message-header = field-name ":" [ field-value ]
|
||||
// field-value = *( field-content | LWS )
|
||||
// field-content = <the OCTETs making up the field-value
|
||||
// and consisting of either *TEXT or combinations
|
||||
// of token, separators, and quoted-string>
|
||||
// message-header = field-name ":" [ field-value ]
|
||||
// field-value = *( field-content | LWS )
|
||||
// field-content = <the OCTETs making up the field-value
|
||||
// and consisting of either *TEXT or combinations
|
||||
// of token, separators, and quoted-string>
|
||||
//
|
||||
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 :
|
||||
//
|
||||
// TEXT = <any OCTET except CTLs,
|
||||
// but including LWS>
|
||||
// LWS = [CRLF] 1*( SP | HT )
|
||||
// CTL = <any US-ASCII control character
|
||||
// (octets 0 - 31) and DEL (127)>
|
||||
// TEXT = <any OCTET except CTLs,
|
||||
// but including LWS>
|
||||
// LWS = [CRLF] 1*( SP | HT )
|
||||
// CTL = <any US-ASCII control character
|
||||
// (octets 0 - 31) and DEL (127)>
|
||||
//
|
||||
// RFC 7230 says:
|
||||
// field-value = *( field-content / obs-fold )
|
||||
// obj-fold = N/A to http2, and deprecated
|
||||
// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
||||
// field-vchar = VCHAR / obs-text
|
||||
// obs-text = %x80-FF
|
||||
// VCHAR = "any visible [USASCII] character"
|
||||
//
|
||||
// field-value = *( field-content / obs-fold )
|
||||
// obj-fold = N/A to http2, and deprecated
|
||||
// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
||||
// field-vchar = VCHAR / obs-text
|
||||
// obs-text = %x80-FF
|
||||
// VCHAR = "any visible [USASCII] character"
|
||||
//
|
||||
// http2 further says: "Similarly, HTTP/2 allows header field values
|
||||
// that are not valid. While most of the values that can be encoded
|
||||
|
|
|
@ -139,7 +139,6 @@ func (p *clientConnPool) getStartDialLocked(ctx context.Context, addr string) *d
|
|||
func (c *dialCall) dial(ctx context.Context, addr string) {
|
||||
const singleUse = false // shared conn
|
||||
c.res, c.err = c.p.t.dialClientConn(ctx, addr, singleUse)
|
||||
close(c.done)
|
||||
|
||||
c.p.mu.Lock()
|
||||
delete(c.p.dialing, addr)
|
||||
|
@ -147,6 +146,8 @@ func (c *dialCall) dial(ctx context.Context, addr string) {
|
|||
c.p.addConnLocked(addr, c.res)
|
||||
}
|
||||
c.p.mu.Unlock()
|
||||
|
||||
close(c.done)
|
||||
}
|
||||
|
||||
// addConnIfNeeded makes a NewClientConn out of c if a connection for key doesn't
|
||||
|
|
|
@ -136,7 +136,7 @@ func (e headerFieldNameError) Error() string {
|
|||
type headerFieldValueError string
|
||||
|
||||
func (e headerFieldValueError) Error() string {
|
||||
return fmt.Sprintf("invalid header field value %q", string(e))
|
||||
return fmt.Sprintf("invalid header field value for %q", string(e))
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -1532,7 +1532,8 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
|
|||
fr.debugReadLoggerf("http2: decoded hpack field %+v", hf)
|
||||
}
|
||||
if !httpguts.ValidHeaderFieldValue(hf.Value) {
|
||||
invalid = headerFieldValueError(hf.Value)
|
||||
// Don't include the value in the error, because it may be sensitive.
|
||||
invalid = headerFieldValueError(hf.Name)
|
||||
}
|
||||
isPseudo := strings.HasPrefix(hf.Name, ":")
|
||||
if isPseudo {
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"bufio"
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -25,7 +24,6 @@ import (
|
|||
|
||||
"golang.org/x/net/http/httpguts"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/hpack"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -61,6 +59,10 @@ type h2cHandler struct {
|
|||
// Once a request is recognized as h2c, we hijack the connection and convert it
|
||||
// to an HTTP/2 connection which is understandable to s.ServeConn. (s.ServeConn
|
||||
// understands HTTP/2 except for the h2c part of it.)
|
||||
//
|
||||
// The first request on an h2c connection is read entirely into memory before
|
||||
// the Handler is called. To limit the memory consumed by this request, wrap
|
||||
// the result of NewHandler in an http.MaxBytesHandler.
|
||||
func NewHandler(h http.Handler, s *http2.Server) http.Handler {
|
||||
return &h2cHandler{
|
||||
Handler: h,
|
||||
|
@ -83,24 +85,31 @@ func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
s.s.ServeConn(conn, &http2.ServeConnOpts{
|
||||
Context: r.Context(),
|
||||
Handler: s.Handler,
|
||||
Context: r.Context(),
|
||||
Handler: s.Handler,
|
||||
SawClientPreface: true,
|
||||
})
|
||||
return
|
||||
}
|
||||
// Handle Upgrade to h2c (RFC 7540 Section 3.2)
|
||||
if conn, err := h2cUpgrade(w, r); err == nil {
|
||||
if isH2CUpgrade(r.Header) {
|
||||
conn, settings, err := h2cUpgrade(w, r)
|
||||
if err != nil {
|
||||
if http2VerboseLogs {
|
||||
log.Printf("h2c: error h2c upgrade: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
s.s.ServeConn(conn, &http2.ServeConnOpts{
|
||||
Context: r.Context(),
|
||||
Handler: s.Handler,
|
||||
Context: r.Context(),
|
||||
Handler: s.Handler,
|
||||
UpgradeRequest: r,
|
||||
Settings: settings,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
s.Handler.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
@ -113,11 +122,11 @@ func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
func initH2CWithPriorKnowledge(w http.ResponseWriter) (net.Conn, error) {
|
||||
hijacker, ok := w.(http.Hijacker)
|
||||
if !ok {
|
||||
panic("Hijack not supported.")
|
||||
return nil, errors.New("h2c: connection does not support Hijack")
|
||||
}
|
||||
conn, rw, err := hijacker.Hijack()
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Hijack failed: %v", err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
const expectedBody = "SM\r\n\r\n"
|
||||
|
@ -125,249 +134,40 @@ func initH2CWithPriorKnowledge(w http.ResponseWriter) (net.Conn, error) {
|
|||
buf := make([]byte, len(expectedBody))
|
||||
n, err := io.ReadFull(rw, buf)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not read from the buffer: %s", err)
|
||||
return nil, fmt.Errorf("h2c: error reading client preface: %s", err)
|
||||
}
|
||||
|
||||
if string(buf[:n]) == expectedBody {
|
||||
c := &rwConn{
|
||||
Conn: conn,
|
||||
Reader: io.MultiReader(strings.NewReader(http2.ClientPreface), rw),
|
||||
BufWriter: rw.Writer,
|
||||
}
|
||||
return c, nil
|
||||
return newBufConn(conn, rw), nil
|
||||
}
|
||||
|
||||
conn.Close()
|
||||
if http2VerboseLogs {
|
||||
log.Printf(
|
||||
"h2c: missing the request body portion of the client preface. Wanted: %v Got: %v",
|
||||
[]byte(expectedBody),
|
||||
buf[0:n],
|
||||
)
|
||||
}
|
||||
return nil, errors.New("invalid client preface")
|
||||
}
|
||||
|
||||
// drainClientPreface reads a single instance of the HTTP/2 client preface from
|
||||
// the supplied reader.
|
||||
func drainClientPreface(r io.Reader) error {
|
||||
var buf bytes.Buffer
|
||||
prefaceLen := int64(len(http2.ClientPreface))
|
||||
n, err := io.CopyN(&buf, r, prefaceLen)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if n != prefaceLen || buf.String() != http2.ClientPreface {
|
||||
return fmt.Errorf("Client never sent: %s", http2.ClientPreface)
|
||||
}
|
||||
return nil
|
||||
return nil, errors.New("h2c: invalid client preface")
|
||||
}
|
||||
|
||||
// h2cUpgrade establishes a h2c connection using the HTTP/1 upgrade (Section 3.2).
|
||||
func h2cUpgrade(w http.ResponseWriter, r *http.Request) (net.Conn, error) {
|
||||
if !isH2CUpgrade(r.Header) {
|
||||
return nil, errors.New("non-conforming h2c headers")
|
||||
}
|
||||
|
||||
// Initial bytes we put into conn to fool http2 server
|
||||
initBytes, _, err := convertH1ReqToH2(r)
|
||||
func h2cUpgrade(w http.ResponseWriter, r *http.Request) (_ net.Conn, settings []byte, err error) {
|
||||
settings, err = getH2Settings(r.Header)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
hijacker, ok := w.(http.Hijacker)
|
||||
if !ok {
|
||||
return nil, errors.New("hijack not supported.")
|
||||
return nil, nil, errors.New("h2c: connection does not support Hijack")
|
||||
}
|
||||
|
||||
body, _ := io.ReadAll(r.Body)
|
||||
r.Body = io.NopCloser(bytes.NewBuffer(body))
|
||||
|
||||
conn, rw, err := hijacker.Hijack()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("hijack failed: %v", err)
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
rw.Write([]byte("HTTP/1.1 101 Switching Protocols\r\n" +
|
||||
"Connection: Upgrade\r\n" +
|
||||
"Upgrade: h2c\r\n\r\n"))
|
||||
rw.Flush()
|
||||
|
||||
// A conforming client will now send an H2 client preface which need to drain
|
||||
// since we already sent this.
|
||||
if err := drainClientPreface(rw); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
c := &rwConn{
|
||||
Conn: conn,
|
||||
Reader: io.MultiReader(initBytes, rw),
|
||||
BufWriter: newSettingsAckSwallowWriter(rw.Writer),
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// convert the data contained in the HTTP/1 upgrade request into the HTTP/2
|
||||
// version in byte form.
|
||||
func convertH1ReqToH2(r *http.Request) (*bytes.Buffer, []http2.Setting, error) {
|
||||
h2Bytes := bytes.NewBuffer([]byte((http2.ClientPreface)))
|
||||
framer := http2.NewFramer(h2Bytes, nil)
|
||||
settings, err := getH2Settings(r.Header)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
if err := framer.WriteSettings(settings...); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
headerBytes, err := getH2HeaderBytes(r, getMaxHeaderTableSize(settings))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
maxFrameSize := int(getMaxFrameSize(settings))
|
||||
needOneHeader := len(headerBytes) < maxFrameSize
|
||||
err = framer.WriteHeaders(http2.HeadersFrameParam{
|
||||
StreamID: 1,
|
||||
BlockFragment: headerBytes,
|
||||
EndHeaders: needOneHeader,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
for i := maxFrameSize; i < len(headerBytes); i += maxFrameSize {
|
||||
if len(headerBytes)-i > maxFrameSize {
|
||||
if err := framer.WriteContinuation(1,
|
||||
false, // endHeaders
|
||||
headerBytes[i:maxFrameSize]); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
} else {
|
||||
if err := framer.WriteContinuation(1,
|
||||
true, // endHeaders
|
||||
headerBytes[i:]); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return h2Bytes, settings, nil
|
||||
}
|
||||
|
||||
// getMaxFrameSize returns the SETTINGS_MAX_FRAME_SIZE. If not present default
|
||||
// value is 16384 as specified by RFC 7540 Section 6.5.2.
|
||||
func getMaxFrameSize(settings []http2.Setting) uint32 {
|
||||
for _, setting := range settings {
|
||||
if setting.ID == http2.SettingMaxFrameSize {
|
||||
return setting.Val
|
||||
}
|
||||
}
|
||||
return 16384
|
||||
}
|
||||
|
||||
// getMaxHeaderTableSize returns the SETTINGS_HEADER_TABLE_SIZE. If not present
|
||||
// default value is 4096 as specified by RFC 7540 Section 6.5.2.
|
||||
func getMaxHeaderTableSize(settings []http2.Setting) uint32 {
|
||||
for _, setting := range settings {
|
||||
if setting.ID == http2.SettingHeaderTableSize {
|
||||
return setting.Val
|
||||
}
|
||||
}
|
||||
return 4096
|
||||
}
|
||||
|
||||
// bufWriter is a Writer interface that also has a Flush method.
|
||||
type bufWriter interface {
|
||||
io.Writer
|
||||
Flush() error
|
||||
}
|
||||
|
||||
// rwConn implements net.Conn but overrides Read and Write so that reads and
|
||||
// writes are forwarded to the provided io.Reader and bufWriter.
|
||||
type rwConn struct {
|
||||
net.Conn
|
||||
io.Reader
|
||||
BufWriter bufWriter
|
||||
}
|
||||
|
||||
// Read forwards reads to the underlying Reader.
|
||||
func (c *rwConn) Read(p []byte) (int, error) {
|
||||
return c.Reader.Read(p)
|
||||
}
|
||||
|
||||
// Write forwards writes to the underlying bufWriter and immediately flushes.
|
||||
func (c *rwConn) Write(p []byte) (int, error) {
|
||||
n, err := c.BufWriter.Write(p)
|
||||
if err := c.BufWriter.Flush(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return n, err
|
||||
}
|
||||
|
||||
// settingsAckSwallowWriter is a writer that normally forwards bytes to its
|
||||
// underlying Writer, but swallows the first SettingsAck frame that it sees.
|
||||
type settingsAckSwallowWriter struct {
|
||||
Writer *bufio.Writer
|
||||
buf []byte
|
||||
didSwallow bool
|
||||
}
|
||||
|
||||
// newSettingsAckSwallowWriter returns a new settingsAckSwallowWriter.
|
||||
func newSettingsAckSwallowWriter(w *bufio.Writer) *settingsAckSwallowWriter {
|
||||
return &settingsAckSwallowWriter{
|
||||
Writer: w,
|
||||
buf: make([]byte, 0),
|
||||
didSwallow: false,
|
||||
}
|
||||
}
|
||||
|
||||
// Write implements io.Writer interface. Normally forwards bytes to w.Writer,
|
||||
// except for the first Settings ACK frame that it sees.
|
||||
func (w *settingsAckSwallowWriter) Write(p []byte) (int, error) {
|
||||
if !w.didSwallow {
|
||||
w.buf = append(w.buf, p...)
|
||||
// Process all the frames we have collected into w.buf
|
||||
for {
|
||||
// Append until we get full frame header which is 9 bytes
|
||||
if len(w.buf) < 9 {
|
||||
break
|
||||
}
|
||||
// Check if we have collected a whole frame.
|
||||
fh, err := http2.ReadFrameHeader(bytes.NewBuffer(w.buf))
|
||||
if err != nil {
|
||||
// Corrupted frame, fail current Write
|
||||
return 0, err
|
||||
}
|
||||
fSize := fh.Length + 9
|
||||
if uint32(len(w.buf)) < fSize {
|
||||
// Have not collected whole frame. Stop processing buf, and withhold on
|
||||
// forward bytes to w.Writer until we get the full frame.
|
||||
break
|
||||
}
|
||||
|
||||
// We have now collected a whole frame.
|
||||
if fh.Type == http2.FrameSettings && fh.Flags.Has(http2.FlagSettingsAck) {
|
||||
// If Settings ACK frame, do not forward to underlying writer, remove
|
||||
// bytes from w.buf, and record that we have swallowed Settings Ack
|
||||
// frame.
|
||||
w.didSwallow = true
|
||||
w.buf = w.buf[fSize:]
|
||||
continue
|
||||
}
|
||||
|
||||
// Not settings ack frame. Forward bytes to w.Writer.
|
||||
if _, err := w.Writer.Write(w.buf[:fSize]); err != nil {
|
||||
// Couldn't forward bytes. Fail current Write.
|
||||
return 0, err
|
||||
}
|
||||
w.buf = w.buf[fSize:]
|
||||
}
|
||||
return len(p), nil
|
||||
}
|
||||
return w.Writer.Write(p)
|
||||
}
|
||||
|
||||
// Flush calls w.Writer.Flush.
|
||||
func (w *settingsAckSwallowWriter) Flush() error {
|
||||
return w.Writer.Flush()
|
||||
return newBufConn(conn, rw), settings, nil
|
||||
}
|
||||
|
||||
// isH2CUpgrade returns true if the header properly request an upgrade to h2c
|
||||
|
@ -377,9 +177,8 @@ func isH2CUpgrade(h http.Header) bool {
|
|||
httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Connection")], "HTTP2-Settings")
|
||||
}
|
||||
|
||||
// getH2Settings returns the []http2.Setting that are encoded in the
|
||||
// HTTP2-Settings header.
|
||||
func getH2Settings(h http.Header) ([]http2.Setting, error) {
|
||||
// getH2Settings returns the settings in the HTTP2-Settings header.
|
||||
func getH2Settings(h http.Header) ([]byte, error) {
|
||||
vals, ok := h[textproto.CanonicalMIMEHeaderKey("HTTP2-Settings")]
|
||||
if !ok {
|
||||
return nil, errors.New("missing HTTP2-Settings header")
|
||||
|
@ -387,115 +186,40 @@ func getH2Settings(h http.Header) ([]http2.Setting, error) {
|
|||
if len(vals) != 1 {
|
||||
return nil, fmt.Errorf("expected 1 HTTP2-Settings. Got: %v", vals)
|
||||
}
|
||||
settings, err := decodeSettings(vals[0])
|
||||
settings, err := base64.RawURLEncoding.DecodeString(vals[0])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Invalid HTTP2-Settings: %q", vals[0])
|
||||
return nil, err
|
||||
}
|
||||
return settings, nil
|
||||
}
|
||||
|
||||
// decodeSettings decodes the base64url header value of the HTTP2-Settings
|
||||
// header. RFC 7540 Section 3.2.1.
|
||||
func decodeSettings(headerVal string) ([]http2.Setting, error) {
|
||||
b, err := base64.RawURLEncoding.DecodeString(headerVal)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
func newBufConn(conn net.Conn, rw *bufio.ReadWriter) net.Conn {
|
||||
rw.Flush()
|
||||
if rw.Reader.Buffered() == 0 {
|
||||
// If there's no buffered data to be read,
|
||||
// we can just discard the bufio.ReadWriter.
|
||||
return conn
|
||||
}
|
||||
if len(b)%6 != 0 {
|
||||
return nil, err
|
||||
}
|
||||
settings := make([]http2.Setting, 0)
|
||||
for i := 0; i < len(b)/6; i++ {
|
||||
settings = append(settings, http2.Setting{
|
||||
ID: http2.SettingID(binary.BigEndian.Uint16(b[i*6 : i*6+2])),
|
||||
Val: binary.BigEndian.Uint32(b[i*6+2 : i*6+6]),
|
||||
})
|
||||
}
|
||||
|
||||
return settings, nil
|
||||
return &bufConn{conn, rw.Reader}
|
||||
}
|
||||
|
||||
// getH2HeaderBytes return the headers in r a []bytes encoded by HPACK.
|
||||
func getH2HeaderBytes(r *http.Request, maxHeaderTableSize uint32) ([]byte, error) {
|
||||
headerBytes := bytes.NewBuffer(nil)
|
||||
hpackEnc := hpack.NewEncoder(headerBytes)
|
||||
hpackEnc.SetMaxDynamicTableSize(maxHeaderTableSize)
|
||||
|
||||
// Section 8.1.2.3
|
||||
err := hpackEnc.WriteField(hpack.HeaderField{
|
||||
Name: ":method",
|
||||
Value: r.Method,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = hpackEnc.WriteField(hpack.HeaderField{
|
||||
Name: ":scheme",
|
||||
Value: "http",
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = hpackEnc.WriteField(hpack.HeaderField{
|
||||
Name: ":authority",
|
||||
Value: r.Host,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
path := r.URL.Path
|
||||
if r.URL.RawQuery != "" {
|
||||
path = strings.Join([]string{path, r.URL.RawQuery}, "?")
|
||||
}
|
||||
err = hpackEnc.WriteField(hpack.HeaderField{
|
||||
Name: ":path",
|
||||
Value: path,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO Implement Section 8.3
|
||||
|
||||
for header, values := range r.Header {
|
||||
// Skip non h2 headers
|
||||
if isNonH2Header(header) {
|
||||
continue
|
||||
}
|
||||
for _, v := range values {
|
||||
err := hpackEnc.WriteField(hpack.HeaderField{
|
||||
Name: strings.ToLower(header),
|
||||
Value: v,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
return headerBytes.Bytes(), nil
|
||||
// bufConn wraps a net.Conn, but reads drain the bufio.Reader first.
|
||||
type bufConn struct {
|
||||
net.Conn
|
||||
*bufio.Reader
|
||||
}
|
||||
|
||||
// Connection specific headers listed in RFC 7540 Section 8.1.2.2 that are not
|
||||
// suppose to be transferred to HTTP/2. The Http2-Settings header is skipped
|
||||
// since already use to create the HTTP/2 SETTINGS frame.
|
||||
var nonH2Headers = []string{
|
||||
"Connection",
|
||||
"Keep-Alive",
|
||||
"Proxy-Connection",
|
||||
"Transfer-Encoding",
|
||||
"Upgrade",
|
||||
"Http2-Settings",
|
||||
}
|
||||
|
||||
// isNonH2Header returns true if header should not be transferred to HTTP/2.
|
||||
func isNonH2Header(header string) bool {
|
||||
for _, nonH2h := range nonH2Headers {
|
||||
if header == nonH2h {
|
||||
return true
|
||||
}
|
||||
func (c *bufConn) Read(p []byte) (int, error) {
|
||||
if c.Reader == nil {
|
||||
return c.Conn.Read(p)
|
||||
}
|
||||
return false
|
||||
n := c.Reader.Buffered()
|
||||
if n == 0 {
|
||||
c.Reader = nil
|
||||
return c.Conn.Read(p)
|
||||
}
|
||||
if n < len(p) {
|
||||
p = p[:n]
|
||||
}
|
||||
return c.Reader.Read(p)
|
||||
}
|
||||
|
|
|
@ -169,25 +169,50 @@ func buildRootHuffmanNode() {
|
|||
// AppendHuffmanString appends s, as encoded in Huffman codes, to dst
|
||||
// and returns the extended buffer.
|
||||
func AppendHuffmanString(dst []byte, s string) []byte {
|
||||
rembits := uint8(8)
|
||||
|
||||
// This relies on the maximum huffman code length being 30 (See tables.go huffmanCodeLen array)
|
||||
// So if a uint64 buffer has less than 32 valid bits can always accommodate another huffmanCode.
|
||||
var (
|
||||
x uint64 // buffer
|
||||
n uint // number valid of bits present in x
|
||||
)
|
||||
for i := 0; i < len(s); i++ {
|
||||
if rembits == 8 {
|
||||
dst = append(dst, 0)
|
||||
c := s[i]
|
||||
n += uint(huffmanCodeLen[c])
|
||||
x <<= huffmanCodeLen[c] % 64
|
||||
x |= uint64(huffmanCodes[c])
|
||||
if n >= 32 {
|
||||
n %= 32 // Normally would be -= 32 but %= 32 informs compiler 0 <= n <= 31 for upcoming shift
|
||||
y := uint32(x >> n) // Compiler doesn't combine memory writes if y isn't uint32
|
||||
dst = append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))
|
||||
}
|
||||
dst, rembits = appendByteToHuffmanCode(dst, rembits, s[i])
|
||||
}
|
||||
|
||||
if rembits < 8 {
|
||||
// special EOS symbol
|
||||
code := uint32(0x3fffffff)
|
||||
nbits := uint8(30)
|
||||
|
||||
t := uint8(code >> (nbits - rembits))
|
||||
dst[len(dst)-1] |= t
|
||||
// Add padding bits if necessary
|
||||
if over := n % 8; over > 0 {
|
||||
const (
|
||||
eosCode = 0x3fffffff
|
||||
eosNBits = 30
|
||||
eosPadByte = eosCode >> (eosNBits - 8)
|
||||
)
|
||||
pad := 8 - over
|
||||
x = (x << pad) | (eosPadByte >> over)
|
||||
n += pad // 8 now divides into n exactly
|
||||
}
|
||||
|
||||
return dst
|
||||
// n in (0, 8, 16, 24, 32)
|
||||
switch n / 8 {
|
||||
case 0:
|
||||
return dst
|
||||
case 1:
|
||||
return append(dst, byte(x))
|
||||
case 2:
|
||||
y := uint16(x)
|
||||
return append(dst, byte(y>>8), byte(y))
|
||||
case 3:
|
||||
y := uint16(x >> 8)
|
||||
return append(dst, byte(y>>8), byte(y), byte(x))
|
||||
}
|
||||
// case 4:
|
||||
y := uint32(x)
|
||||
return append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))
|
||||
}
|
||||
|
||||
// HuffmanEncodeLength returns the number of bytes required to encode
|
||||
|
@ -199,35 +224,3 @@ func HuffmanEncodeLength(s string) uint64 {
|
|||
}
|
||||
return (n + 7) / 8
|
||||
}
|
||||
|
||||
// appendByteToHuffmanCode appends Huffman code for c to dst and
|
||||
// returns the extended buffer and the remaining bits in the last
|
||||
// element. The appending is not byte aligned and the remaining bits
|
||||
// in the last element of dst is given in rembits.
|
||||
func appendByteToHuffmanCode(dst []byte, rembits uint8, c byte) ([]byte, uint8) {
|
||||
code := huffmanCodes[c]
|
||||
nbits := huffmanCodeLen[c]
|
||||
|
||||
for {
|
||||
if rembits > nbits {
|
||||
t := uint8(code << (rembits - nbits))
|
||||
dst[len(dst)-1] |= t
|
||||
rembits -= nbits
|
||||
break
|
||||
}
|
||||
|
||||
t := uint8(code >> (nbits - rembits))
|
||||
dst[len(dst)-1] |= t
|
||||
|
||||
nbits -= rembits
|
||||
rembits = 8
|
||||
|
||||
if nbits == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
dst = append(dst, 0)
|
||||
}
|
||||
|
||||
return dst, rembits
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// See https://http2.github.io/ for more information on HTTP/2.
|
||||
//
|
||||
// See https://http2.golang.org/ for a test server running this code.
|
||||
//
|
||||
package http2 // import "golang.org/x/net/http2"
|
||||
|
||||
import (
|
||||
|
@ -176,10 +175,11 @@ func (s SettingID) String() string {
|
|||
// name (key). See httpguts.ValidHeaderName for the base rules.
|
||||
//
|
||||
// Further, http2 says:
|
||||
// "Just as in HTTP/1.x, header field names are strings of ASCII
|
||||
// characters that are compared in a case-insensitive
|
||||
// fashion. However, header field names MUST be converted to
|
||||
// lowercase prior to their encoding in HTTP/2. "
|
||||
//
|
||||
// "Just as in HTTP/1.x, header field names are strings of ASCII
|
||||
// characters that are compared in a case-insensitive
|
||||
// fashion. However, header field names MUST be converted to
|
||||
// lowercase prior to their encoding in HTTP/2. "
|
||||
func validWireHeaderFieldName(v string) bool {
|
||||
if len(v) == 0 {
|
||||
return false
|
||||
|
@ -365,8 +365,8 @@ func (s *sorter) SortStrings(ss []string) {
|
|||
// validPseudoPath reports whether v is a valid :path pseudo-header
|
||||
// value. It must be either:
|
||||
//
|
||||
// *) a non-empty string starting with '/'
|
||||
// *) the string '*', for OPTIONS requests.
|
||||
// - a non-empty string starting with '/'
|
||||
// - the string '*', for OPTIONS requests.
|
||||
//
|
||||
// For now this is only used a quick check for deciding when to clean
|
||||
// up Opaque URLs before sending requests from the Transport.
|
||||
|
|
|
@ -315,6 +315,20 @@ type ServeConnOpts struct {
|
|||
// requests. If nil, BaseConfig.Handler is used. If BaseConfig
|
||||
// or BaseConfig.Handler is nil, http.DefaultServeMux is used.
|
||||
Handler http.Handler
|
||||
|
||||
// UpgradeRequest is an initial request received on a connection
|
||||
// undergoing an h2c upgrade. The request body must have been
|
||||
// completely read from the connection before calling ServeConn,
|
||||
// and the 101 Switching Protocols response written.
|
||||
UpgradeRequest *http.Request
|
||||
|
||||
// Settings is the decoded contents of the HTTP2-Settings header
|
||||
// in an h2c upgrade request.
|
||||
Settings []byte
|
||||
|
||||
// SawClientPreface is set if the HTTP/2 connection preface
|
||||
// has already been read from the connection.
|
||||
SawClientPreface bool
|
||||
}
|
||||
|
||||
func (o *ServeConnOpts) context() context.Context {
|
||||
|
@ -383,6 +397,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|||
headerTableSize: initialHeaderTableSize,
|
||||
serveG: newGoroutineLock(),
|
||||
pushEnabled: true,
|
||||
sawClientPreface: opts.SawClientPreface,
|
||||
}
|
||||
|
||||
s.state.registerConn(sc)
|
||||
|
@ -400,7 +415,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|||
if s.NewWriteScheduler != nil {
|
||||
sc.writeSched = s.NewWriteScheduler()
|
||||
} else {
|
||||
sc.writeSched = NewRandomWriteScheduler()
|
||||
sc.writeSched = NewPriorityWriteScheduler(nil)
|
||||
}
|
||||
|
||||
// These start at the RFC-specified defaults. If there is a higher
|
||||
|
@ -465,9 +480,27 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|||
}
|
||||
}
|
||||
|
||||
if opts.Settings != nil {
|
||||
fr := &SettingsFrame{
|
||||
FrameHeader: FrameHeader{valid: true},
|
||||
p: opts.Settings,
|
||||
}
|
||||
if err := fr.ForeachSetting(sc.processSetting); err != nil {
|
||||
sc.rejectConn(ErrCodeProtocol, "invalid settings")
|
||||
return
|
||||
}
|
||||
opts.Settings = nil
|
||||
}
|
||||
|
||||
if hook := testHookGetServerConn; hook != nil {
|
||||
hook(sc)
|
||||
}
|
||||
|
||||
if opts.UpgradeRequest != nil {
|
||||
sc.upgradeRequest(opts.UpgradeRequest)
|
||||
opts.UpgradeRequest = nil
|
||||
}
|
||||
|
||||
sc.serve()
|
||||
}
|
||||
|
||||
|
@ -512,6 +545,7 @@ type serverConn struct {
|
|||
// Everything following is owned by the serve loop; use serveG.check():
|
||||
serveG goroutineLock // used to verify funcs are on serve()
|
||||
pushEnabled bool
|
||||
sawClientPreface bool // preface has already been read, used in h2c upgrade
|
||||
sawFirstSettings bool // got the initial SETTINGS frame after the preface
|
||||
needToSendSettingsAck bool
|
||||
unackedSettings int // how many SETTINGS have we sent without ACKs?
|
||||
|
@ -974,6 +1008,9 @@ var errPrefaceTimeout = errors.New("timeout waiting for client preface")
|
|||
// returns errPrefaceTimeout on timeout, or an error if the greeting
|
||||
// is invalid.
|
||||
func (sc *serverConn) readPreface() error {
|
||||
if sc.sawClientPreface {
|
||||
return nil
|
||||
}
|
||||
errc := make(chan error, 1)
|
||||
go func() {
|
||||
// Read the client preface
|
||||
|
@ -1915,6 +1952,26 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (sc *serverConn) upgradeRequest(req *http.Request) {
|
||||
sc.serveG.check()
|
||||
id := uint32(1)
|
||||
sc.maxClientStreamID = id
|
||||
st := sc.newStream(id, 0, stateHalfClosedRemote)
|
||||
st.reqTrailer = req.Trailer
|
||||
if st.reqTrailer != nil {
|
||||
st.trailer = make(http.Header)
|
||||
}
|
||||
rw := sc.newResponseWriter(st, req)
|
||||
|
||||
// Disable any read deadline set by the net/http package
|
||||
// prior to the upgrade.
|
||||
if sc.hs.ReadTimeout != 0 {
|
||||
sc.conn.SetReadDeadline(time.Time{})
|
||||
}
|
||||
|
||||
go sc.runHandler(rw, req, sc.handler.ServeHTTP)
|
||||
}
|
||||
|
||||
func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
|
||||
sc := st.sc
|
||||
sc.serveG.check()
|
||||
|
@ -2145,6 +2202,11 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
|
|||
}
|
||||
req = req.WithContext(st.ctx)
|
||||
|
||||
rw := sc.newResponseWriter(st, req)
|
||||
return rw, req, nil
|
||||
}
|
||||
|
||||
func (sc *serverConn) newResponseWriter(st *stream, req *http.Request) *responseWriter {
|
||||
rws := responseWriterStatePool.Get().(*responseWriterState)
|
||||
bwSave := rws.bw
|
||||
*rws = responseWriterState{} // zero all the fields
|
||||
|
@ -2153,10 +2215,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
|
|||
rws.bw.Reset(chunkWriter{rws})
|
||||
rws.stream = st
|
||||
rws.req = req
|
||||
rws.body = body
|
||||
|
||||
rw := &responseWriter{rws: rws}
|
||||
return rw, req, nil
|
||||
return &responseWriter{rws: rws}
|
||||
}
|
||||
|
||||
// Run on its own goroutine.
|
||||
|
@ -2316,17 +2375,18 @@ type requestBody struct {
|
|||
_ incomparable
|
||||
stream *stream
|
||||
conn *serverConn
|
||||
closed bool // for use by Close only
|
||||
sawEOF bool // for use by Read only
|
||||
pipe *pipe // non-nil if we have a HTTP entity message body
|
||||
needsContinue bool // need to send a 100-continue
|
||||
closeOnce sync.Once // for use by Close only
|
||||
sawEOF bool // for use by Read only
|
||||
pipe *pipe // non-nil if we have a HTTP entity message body
|
||||
needsContinue bool // need to send a 100-continue
|
||||
}
|
||||
|
||||
func (b *requestBody) Close() error {
|
||||
if b.pipe != nil && !b.closed {
|
||||
b.pipe.BreakWithError(errClosedBody)
|
||||
}
|
||||
b.closed = true
|
||||
b.closeOnce.Do(func() {
|
||||
if b.pipe != nil {
|
||||
b.pipe.BreakWithError(errClosedBody)
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -2370,7 +2430,6 @@ type responseWriterState struct {
|
|||
// immutable within a request:
|
||||
stream *stream
|
||||
req *http.Request
|
||||
body *requestBody // to close at end of request, if DATA frames didn't
|
||||
conn *serverConn
|
||||
|
||||
// TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc
|
||||
|
@ -2546,8 +2605,9 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
|||
// prior to the headers being written. If the set of trailers is fixed
|
||||
// or known before the header is written, the normal Go trailers mechanism
|
||||
// is preferred:
|
||||
// https://golang.org/pkg/net/http/#ResponseWriter
|
||||
// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
|
||||
//
|
||||
// https://golang.org/pkg/net/http/#ResponseWriter
|
||||
// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
|
||||
const TrailerPrefix = "Trailer:"
|
||||
|
||||
// promoteUndeclaredTrailers permits http.Handlers to set trailers
|
||||
|
@ -2643,8 +2703,7 @@ func checkWriteHeaderCode(code int) {
|
|||
// Issue 22880: require valid WriteHeader status codes.
|
||||
// For now we only enforce that it's three digits.
|
||||
// In the future we might block things over 599 (600 and above aren't defined
|
||||
// at http://httpwg.org/specs/rfc7231.html#status.codes)
|
||||
// and we might block under 200 (once we have more mature 1xx support).
|
||||
// at http://httpwg.org/specs/rfc7231.html#status.codes).
|
||||
// But for now any three digits.
|
||||
//
|
||||
// We used to send "HTTP/1.1 000 0" on the wire in responses but there's
|
||||
|
@ -2665,13 +2724,41 @@ func (w *responseWriter) WriteHeader(code int) {
|
|||
}
|
||||
|
||||
func (rws *responseWriterState) writeHeader(code int) {
|
||||
if !rws.wroteHeader {
|
||||
checkWriteHeaderCode(code)
|
||||
rws.wroteHeader = true
|
||||
rws.status = code
|
||||
if len(rws.handlerHeader) > 0 {
|
||||
rws.snapHeader = cloneHeader(rws.handlerHeader)
|
||||
if rws.wroteHeader {
|
||||
return
|
||||
}
|
||||
|
||||
checkWriteHeaderCode(code)
|
||||
|
||||
// Handle informational headers
|
||||
if code >= 100 && code <= 199 {
|
||||
// Per RFC 8297 we must not clear the current header map
|
||||
h := rws.handlerHeader
|
||||
|
||||
_, cl := h["Content-Length"]
|
||||
_, te := h["Transfer-Encoding"]
|
||||
if cl || te {
|
||||
h = h.Clone()
|
||||
h.Del("Content-Length")
|
||||
h.Del("Transfer-Encoding")
|
||||
}
|
||||
|
||||
if rws.conn.writeHeaders(rws.stream, &writeResHeaders{
|
||||
streamID: rws.stream.id,
|
||||
httpResCode: code,
|
||||
h: h,
|
||||
endStream: rws.handlerDone && !rws.hasTrailers(),
|
||||
}) != nil {
|
||||
rws.dirty = true
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
rws.wroteHeader = true
|
||||
rws.status = code
|
||||
if len(rws.handlerHeader) > 0 {
|
||||
rws.snapHeader = cloneHeader(rws.handlerHeader)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math"
|
||||
mathrand "math/rand"
|
||||
|
@ -501,12 +500,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
|
|||
if req, err = shouldRetryRequest(req, err); err == nil {
|
||||
// After the first retry, do exponential backoff with 10% jitter.
|
||||
if retry == 0 {
|
||||
t.vlogf("RoundTrip retrying after failure: %v", err)
|
||||
continue
|
||||
}
|
||||
backoff := float64(uint(1) << (uint(retry) - 1))
|
||||
backoff += backoff * (0.1 * mathrand.Float64())
|
||||
select {
|
||||
case <-time.After(time.Second * time.Duration(backoff)):
|
||||
t.vlogf("RoundTrip retrying after failure: %v", err)
|
||||
continue
|
||||
case <-req.Context().Done():
|
||||
err = req.Context().Err()
|
||||
|
@ -732,10 +733,13 @@ func (cc *ClientConn) healthCheck() {
|
|||
// trigger the healthCheck again if there is no frame received.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
|
||||
defer cancel()
|
||||
cc.vlogf("http2: Transport sending health check")
|
||||
err := cc.Ping(ctx)
|
||||
if err != nil {
|
||||
cc.vlogf("http2: Transport health check failure: %v", err)
|
||||
cc.closeForLostPing()
|
||||
return
|
||||
} else {
|
||||
cc.vlogf("http2: Transport health check success")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1765,7 +1769,8 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
|
|||
}
|
||||
for _, v := range vv {
|
||||
if !httpguts.ValidHeaderFieldValue(v) {
|
||||
return nil, fmt.Errorf("invalid HTTP header value %q for header %q", v, k)
|
||||
// Don't include the value in the error, because it may be sensitive.
|
||||
return nil, fmt.Errorf("invalid HTTP header value for header %q", k)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2898,7 +2903,12 @@ func (t *Transport) logf(format string, args ...interface{}) {
|
|||
log.Printf(format, args...)
|
||||
}
|
||||
|
||||
var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil))
|
||||
var noBody io.ReadCloser = noBodyReader{}
|
||||
|
||||
type noBodyReader struct{}
|
||||
|
||||
func (noBodyReader) Close() error { return nil }
|
||||
func (noBodyReader) Read([]byte) (int, error) { return 0, io.EOF }
|
||||
|
||||
type missingBody struct{}
|
||||
|
||||
|
|
|
@ -383,16 +383,15 @@ func (ws *priorityWriteScheduler) AdjustStream(streamID uint32, priority Priorit
|
|||
|
||||
func (ws *priorityWriteScheduler) Push(wr FrameWriteRequest) {
|
||||
var n *priorityNode
|
||||
if id := wr.StreamID(); id == 0 {
|
||||
if wr.isControl() {
|
||||
n = &ws.root
|
||||
} else {
|
||||
id := wr.StreamID()
|
||||
n = ws.nodes[id]
|
||||
if n == nil {
|
||||
// id is an idle or closed stream. wr should not be a HEADERS or
|
||||
// DATA frame. However, wr can be a RST_STREAM. In this case, we
|
||||
// push wr onto the root, rather than creating a new priorityNode,
|
||||
// since RST_STREAM is tiny and the stream's priority is unknown
|
||||
// anyway. See issue #17919.
|
||||
// DATA frame. In other case, we push wr onto the root, rather
|
||||
// than creating a new priorityNode.
|
||||
if wr.DataSize() > 0 {
|
||||
panic("add DATA on non-open stream")
|
||||
}
|
||||
|
|
|
@ -17,23 +17,23 @@ package idna
|
|||
//
|
||||
// The per-rune values have the following format:
|
||||
//
|
||||
// if mapped {
|
||||
// if inlinedXOR {
|
||||
// 15..13 inline XOR marker
|
||||
// 12..11 unused
|
||||
// 10..3 inline XOR mask
|
||||
// } else {
|
||||
// 15..3 index into xor or mapping table
|
||||
// }
|
||||
// } else {
|
||||
// 15..14 unused
|
||||
// 13 mayNeedNorm
|
||||
// 12..11 attributes
|
||||
// 10..8 joining type
|
||||
// 7..3 category type
|
||||
// }
|
||||
// 2 use xor pattern
|
||||
// 1..0 mapped category
|
||||
// if mapped {
|
||||
// if inlinedXOR {
|
||||
// 15..13 inline XOR marker
|
||||
// 12..11 unused
|
||||
// 10..3 inline XOR mask
|
||||
// } else {
|
||||
// 15..3 index into xor or mapping table
|
||||
// }
|
||||
// } else {
|
||||
// 15..14 unused
|
||||
// 13 mayNeedNorm
|
||||
// 12..11 attributes
|
||||
// 10..8 joining type
|
||||
// 7..3 category type
|
||||
// }
|
||||
// 2 use xor pattern
|
||||
// 1..0 mapped category
|
||||
//
|
||||
// See the definitions below for a more detailed description of the various
|
||||
// bits.
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
@ -8,22 +8,35 @@ package errgroup
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type token struct{}
|
||||
|
||||
// A Group is a collection of goroutines working on subtasks that are part of
|
||||
// the same overall task.
|
||||
//
|
||||
// A zero Group is valid and does not cancel on error.
|
||||
// A zero Group is valid, has no limit on the number of active goroutines,
|
||||
// and does not cancel on error.
|
||||
type Group struct {
|
||||
cancel func()
|
||||
|
||||
wg sync.WaitGroup
|
||||
|
||||
sem chan token
|
||||
|
||||
errOnce sync.Once
|
||||
err error
|
||||
}
|
||||
|
||||
func (g *Group) done() {
|
||||
if g.sem != nil {
|
||||
<-g.sem
|
||||
}
|
||||
g.wg.Done()
|
||||
}
|
||||
|
||||
// WithContext returns a new Group and an associated Context derived from ctx.
|
||||
//
|
||||
// The derived Context is canceled the first time a function passed to Go
|
||||
|
@ -45,14 +58,19 @@ func (g *Group) Wait() error {
|
|||
}
|
||||
|
||||
// Go calls the given function in a new goroutine.
|
||||
// It blocks until the new goroutine can be added without the number of
|
||||
// active goroutines in the group exceeding the configured limit.
|
||||
//
|
||||
// The first call to return a non-nil error cancels the group; its error will be
|
||||
// returned by Wait.
|
||||
func (g *Group) Go(f func() error) {
|
||||
g.wg.Add(1)
|
||||
if g.sem != nil {
|
||||
g.sem <- token{}
|
||||
}
|
||||
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.wg.Done()
|
||||
defer g.done()
|
||||
|
||||
if err := f(); err != nil {
|
||||
g.errOnce.Do(func() {
|
||||
|
@ -64,3 +82,51 @@ func (g *Group) Go(f func() error) {
|
|||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// TryGo calls the given function in a new goroutine only if the number of
|
||||
// active goroutines in the group is currently below the configured limit.
|
||||
//
|
||||
// The return value reports whether the goroutine was started.
|
||||
func (g *Group) TryGo(f func() error) bool {
|
||||
if g.sem != nil {
|
||||
select {
|
||||
case g.sem <- token{}:
|
||||
// Note: this allows barging iff channels in general allow barging.
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
g.wg.Add(1)
|
||||
go func() {
|
||||
defer g.done()
|
||||
|
||||
if err := f(); err != nil {
|
||||
g.errOnce.Do(func() {
|
||||
g.err = err
|
||||
if g.cancel != nil {
|
||||
g.cancel()
|
||||
}
|
||||
})
|
||||
}
|
||||
}()
|
||||
return true
|
||||
}
|
||||
|
||||
// SetLimit limits the number of active goroutines in this group to at most n.
|
||||
// A negative value indicates no limit.
|
||||
//
|
||||
// Any subsequent call to the Go method will block until it can add an active
|
||||
// goroutine without exceeding the configured limit.
|
||||
//
|
||||
// The limit must not be modified while any goroutines in the group are active.
|
||||
func (g *Group) SetLimit(n int) {
|
||||
if n < 0 {
|
||||
g.sem = nil
|
||||
return
|
||||
}
|
||||
if len(g.sem) != 0 {
|
||||
panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", len(g.sem)))
|
||||
}
|
||||
g.sem = make(chan token, n)
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
@ -53,7 +53,7 @@ func relError(file, path string) error {
|
|||
// LookPath instead returns an error.
|
||||
func LookPath(file string) (string, error) {
|
||||
path, err := exec.LookPath(file)
|
||||
if err != nil {
|
||||
if err != nil && !isGo119ErrDot(err) {
|
||||
return "", err
|
||||
}
|
||||
if filepath.Base(file) == file && !filepath.IsAbs(path) {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2022 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 !go1.19
|
||||
// +build !go1.19
|
||||
|
||||
package execabs
|
||||
|
||||
func isGo119ErrDot(err error) bool {
|
||||
return false
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2022 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 go1.19
|
||||
// +build go1.19
|
||||
|
||||
package execabs
|
||||
|
||||
import "strings"
|
||||
|
||||
func isGo119ErrDot(err error) bool {
|
||||
// TODO: return errors.Is(err, exec.ErrDot)
|
||||
return strings.Contains(err.Error(), "current directory")
|
||||
}
|
|
@ -113,5 +113,6 @@ func (tv *Timeval) Nano() int64 {
|
|||
|
||||
// use is a no-op, but the compiler cannot see that it is.
|
||||
// Calling use(p) ensures that p is kept live until that point.
|
||||
//
|
||||
//go:noescape
|
||||
func use(p unsafe.Pointer)
|
||||
|
|
|
@ -115,6 +115,7 @@ func Write(fd int, p []byte) (n int, err error) {
|
|||
var ioSync int64
|
||||
|
||||
//sys fd2path(fd int, buf []byte) (err error)
|
||||
|
||||
func Fd2path(fd int) (path string, err error) {
|
||||
var buf [512]byte
|
||||
|
||||
|
@ -126,6 +127,7 @@ func Fd2path(fd int) (path string, err error) {
|
|||
}
|
||||
|
||||
//sys pipe(p *[2]int32) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return syscall.ErrorString("bad arg in system call")
|
||||
|
@ -180,6 +182,7 @@ func (w Waitmsg) ExitStatus() int {
|
|||
}
|
||||
|
||||
//sys await(s []byte) (n int, err error)
|
||||
|
||||
func Await(w *Waitmsg) (err error) {
|
||||
var buf [512]byte
|
||||
var f [5][]byte
|
||||
|
@ -301,42 +304,49 @@ func Getgroups() (gids []int, err error) {
|
|||
}
|
||||
|
||||
//sys open(path string, mode int) (fd int, err error)
|
||||
|
||||
func Open(path string, mode int) (fd int, err error) {
|
||||
fixwd()
|
||||
return open(path, mode)
|
||||
}
|
||||
|
||||
//sys create(path string, mode int, perm uint32) (fd int, err error)
|
||||
|
||||
func Create(path string, mode int, perm uint32) (fd int, err error) {
|
||||
fixwd()
|
||||
return create(path, mode, perm)
|
||||
}
|
||||
|
||||
//sys remove(path string) (err error)
|
||||
|
||||
func Remove(path string) error {
|
||||
fixwd()
|
||||
return remove(path)
|
||||
}
|
||||
|
||||
//sys stat(path string, edir []byte) (n int, err error)
|
||||
|
||||
func Stat(path string, edir []byte) (n int, err error) {
|
||||
fixwd()
|
||||
return stat(path, edir)
|
||||
}
|
||||
|
||||
//sys bind(name string, old string, flag int) (err error)
|
||||
|
||||
func Bind(name string, old string, flag int) (err error) {
|
||||
fixwd()
|
||||
return bind(name, old, flag)
|
||||
}
|
||||
|
||||
//sys mount(fd int, afd int, old string, flag int, aname string) (err error)
|
||||
|
||||
func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
|
||||
fixwd()
|
||||
return mount(fd, afd, old, flag, aname)
|
||||
}
|
||||
|
||||
//sys wstat(path string, edir []byte) (err error)
|
||||
|
||||
func Wstat(path string, edir []byte) (err error) {
|
||||
fixwd()
|
||||
return wstat(path, edir)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
// +build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// System call support for RISCV64 BSD
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright 2022 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 && loong64 && gc
|
||||
// +build linux
|
||||
// +build loong64
|
||||
// +build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
JAL runtime·entersyscall(SB)
|
||||
MOVV a1+8(FP), R4
|
||||
MOVV a2+16(FP), R5
|
||||
MOVV a3+24(FP), R6
|
||||
MOVV R0, R7
|
||||
MOVV R0, R8
|
||||
MOVV R0, R9
|
||||
MOVV trap+0(FP), R11 // syscall entry
|
||||
SYSCALL
|
||||
MOVV R4, r1+32(FP)
|
||||
MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
|
||||
JAL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOVV a1+8(FP), R4
|
||||
MOVV a2+16(FP), R5
|
||||
MOVV a3+24(FP), R6
|
||||
MOVV R0, R7
|
||||
MOVV R0, R8
|
||||
MOVV R0, R9
|
||||
MOVV trap+0(FP), R11 // syscall entry
|
||||
SYSCALL
|
||||
MOVV R4, r1+32(FP)
|
||||
MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
|
||||
RET
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
|
||||
// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
|
||||
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
|
||||
// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,233 +0,0 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
|
@ -1,233 +0,0 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8040720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8040720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
|
@ -1,226 +0,0 @@
|
|||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
|
||||
// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
|
||||
IFF_SMART = 0x20
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_IPXIP = 0xf9
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IP_FAITH = 0x16
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue