This commit is contained in:
Jim Minter 2019-12-08 10:12:17 -06:00
Родитель 1804906446
Коммит 3ac7b2148b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 0730CBDA10D1A2D3
17 изменённых файлов: 75 добавлений и 48 удалений

28
Gopkg.lock сгенерированный
Просмотреть файл

@ -40,7 +40,7 @@
version = "v36.2.0"
[[projects]]
digest = "1:6a638b1a468a4a8b67fc80ae6a075811a932c6aea327cc28b3ef3a29fba31f4a"
digest = "1:2e9f9f3381b65a6f99438e30ce398cbc13eb224187950158321ad9e560261f40"
name = "github.com/Azure/go-autorest"
packages = [
"autorest",
@ -55,8 +55,8 @@
"tracing",
]
pruneopts = "UT"
revision = "3492b2aff5036c67228ab3c7dba3577c871db200"
version = "v13.3.0"
revision = "21d4b01533b1005be0d020da67a6d3f8ebdf0141"
version = "v13.3.1"
[[projects]]
digest = "1:9f3b30d9f8e0d7040f729b82dcbc8f0dead820a133b3147ce355fc451f32d761"
@ -412,14 +412,14 @@
[[projects]]
branch = "master"
digest = "1:e35aaaa913b3844719fef679db37e18d1fb7d08612c8cd67742eac5109781259"
digest = "1:fab78769b9f0db838a8b336506a6c0cd24deda70d99c5c8179eedce5d1566256"
name = "github.com/jim-minter/go-cosmosdb"
packages = [
"cmd/gencosmosdb",
"pkg/gencosmosdb",
]
pruneopts = "UT"
revision = "37b069ffb0f1725f26cbf3f2c6486b6a1c9a8514"
revision = "5d89a846947107f9cc5db3eef66a14582da82e74"
[[projects]]
digest = "1:bb81097a5b62634f3e9fec1014657855610c82d19b9a40c17612e32651e35dca"
@ -606,7 +606,7 @@
"version",
]
pruneopts = "UT"
revision = "c54751546ee405b1fc7784988ef828d35e3b2777"
revision = "83cfad33adf5a3a60fd801f71e190d82363dd764"
[[projects]]
branch = "release-4.3"
@ -886,7 +886,7 @@
"ssh/terminal",
]
pruneopts = "UT"
revision = "0a08dada0ff98d02f3864a23ae8d27cb8fba5303"
revision = "e9b2fee46413994441b28dfca259d911d963dfed"
[[projects]]
branch = "master"
@ -903,7 +903,7 @@
"trace",
]
pruneopts = "UT"
revision = "5ee1b9f4859acd2e99987ef94ec7a58427c53bef"
revision = "e7e4b65ae66375ec1e85afc8e6b9b4933ae4da81"
[[projects]]
branch = "master"
@ -921,7 +921,7 @@
[[projects]]
branch = "master"
digest = "1:81ed742366f09d62d06e52d955c66f5401067a60f307c111da04b46c99bd9869"
digest = "1:091b04b83236a97c5a301c2db511f178f5dc628ddaf35d0e77223679e9e3ca52"
name = "golang.org/x/sys"
packages = [
"cpu",
@ -929,7 +929,7 @@
"windows",
]
pruneopts = "UT"
revision = "ce4227a45e2eb77e5c847278dcc6a626742e2945"
revision = "eeba5f6aabab6d6594a9191d6bfeaca5fa6a8248"
[[projects]]
digest = "1:1e7fe301d41aead2026c0ade066adcf5e60af7d355cd0f826193852190350d82"
@ -971,7 +971,7 @@
[[projects]]
branch = "master"
digest = "1:b2f37ab238edaf8b8507215cd24a1eaf57071bb3234e9142c32bf23f59986844"
digest = "1:e809a6adc0de0a9ec4c4f87f9895cca0bf80d28e62019247d5dd0db05c9fd847"
name = "golang.org/x/tools"
packages = [
"cmd/goimports",
@ -988,7 +988,7 @@
"internal/semver",
]
pruneopts = "UT"
revision = "d1f10d1c4e255575ef5161427fac1a82b5d5ddf8"
revision = "259af5ff87bdcd4abf2ecda8edc3f13f04f26a42"
[[projects]]
digest = "1:f3661f6218166acf60f5d551b44a537f7ecb8686be02ece061c5950cbfc9ba17"
@ -1034,7 +1034,7 @@
name = "google.golang.org/genproto"
packages = ["googleapis/rpc/status"]
pruneopts = "UT"
revision = "51378566eb590fa106d1025ea12835a4416dda84"
revision = "0243a4be9c8f1264d238fdc2895620b4d9baf9e1"
[[projects]]
digest = "1:b59ce3ddb11daeeccccc9cb3183b58ebf8e9a779f1c853308cd91612e817a301"
@ -1318,7 +1318,7 @@
"pkg/apis/awsproviderconfig/v1beta1",
]
pruneopts = "UT"
revision = "987ca1c365a091232e9bc4db32c2fc6d04486219"
revision = "c22ade5b51f43a415ff5115928b8e39a9ed4fa75"
source = "https://github.com/openshift/cluster-api-provider-aws.git"
[[projects]]

Просмотреть файл

@ -22,7 +22,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "3492b2aff5036c67228ab3c7dba3577c871db200",
"commitHash": "21d4b01533b1005be0d020da67a6d3f8ebdf0141",
"repositoryUrl": "https://github.com/Azure/go-autorest/"
}
}
@ -310,7 +310,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "37b069ffb0f1725f26cbf3f2c6486b6a1c9a8514",
"commitHash": "5d89a846947107f9cc5db3eef66a14582da82e74",
"repositoryUrl": "https://github.com/jim-minter/go-cosmosdb/"
}
}
@ -490,7 +490,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "c54751546ee405b1fc7784988ef828d35e3b2777",
"commitHash": "83cfad33adf5a3a60fd801f71e190d82363dd764",
"repositoryUrl": "https://github.com/openshift/cloud-credential-operator/"
}
}
@ -661,7 +661,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "0a08dada0ff98d02f3864a23ae8d27cb8fba5303",
"commitHash": "e9b2fee46413994441b28dfca259d911d963dfed",
"repositoryUrl": "https://golang.org/x/crypto/"
}
}
@ -670,7 +670,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "5ee1b9f4859acd2e99987ef94ec7a58427c53bef",
"commitHash": "e7e4b65ae66375ec1e85afc8e6b9b4933ae4da81",
"repositoryUrl": "https://golang.org/x/net/"
}
}
@ -688,7 +688,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "ce4227a45e2eb77e5c847278dcc6a626742e2945",
"commitHash": "eeba5f6aabab6d6594a9191d6bfeaca5fa6a8248",
"repositoryUrl": "https://golang.org/x/sys/"
}
}
@ -715,7 +715,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "d1f10d1c4e255575ef5161427fac1a82b5d5ddf8",
"commitHash": "259af5ff87bdcd4abf2ecda8edc3f13f04f26a42",
"repositoryUrl": "https://golang.org/x/tools/"
}
}
@ -742,7 +742,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "51378566eb590fa106d1025ea12835a4416dda84",
"commitHash": "0243a4be9c8f1264d238fdc2895620b4d9baf9e1",
"repositoryUrl": "https://google.golang.org/genproto/"
}
}
@ -850,7 +850,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "987ca1c365a091232e9bc4db32c2fc6d04486219",
"commitHash": "c22ade5b51f43a415ff5115928b8e39a9ed4fa75",
"repositoryUrl": "https://sigs.k8s.io/cluster-api-provider-aws/"
}
}

Просмотреть файл

@ -100,7 +100,10 @@ func (c *databaseClient) do(method, path, resourceType, resourceLink string, exp
if err != nil {
return err
}
defer resp.Body.Close()
defer func() {
resp.Body.Read(nil)
resp.Body.Close()
}()
if headers != nil {
for k := range headers {

4
vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod сгенерированный поставляемый
Просмотреть файл

@ -4,8 +4,8 @@ go 1.12
require (
github.com/Azure/go-autorest/autorest v0.9.2
github.com/Azure/go-autorest/autorest/adal v0.7.0
github.com/Azure/go-autorest/autorest/azure/cli v0.3.0
github.com/Azure/go-autorest/autorest/adal v0.8.0
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1
github.com/dimchansky/utfbom v1.1.0
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
)

10
vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum сгенерированный поставляемый
Просмотреть файл

@ -4,12 +4,10 @@ github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39k
github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo=
github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.7.0 h1:PUMxSVw3tEImG0JTRqbxjXLKCSoPk7DartDELqlOuiI=
github.com/Azure/go-autorest/autorest/adal v0.7.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 h1:5PAqnv+CSTwW9mlZWZAizmzrazFWEgZykEZXpr2hDtY=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.0/go.mod h1:rNYMNAefZMRowqCV0cVhr/YDW5dD7afFq9nXAXL4ykE=
github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw=
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=

2
vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod сгенерированный поставляемый
Просмотреть файл

@ -4,7 +4,7 @@ go 1.12
require (
github.com/Azure/go-autorest/autorest v0.9.0
github.com/Azure/go-autorest/autorest/adal v0.6.0
github.com/Azure/go-autorest/autorest/adal v0.8.0
github.com/Azure/go-autorest/autorest/date v0.2.0
github.com/dimchansky/utfbom v1.1.0
github.com/mitchellh/go-homedir v1.1.0

4
vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum сгенерированный поставляемый
Просмотреть файл

@ -2,8 +2,8 @@ github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8Ly
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo=
github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=

6
vendor/github.com/Azure/go-autorest/autorest/go.mod сгенерированный поставляемый
Просмотреть файл

@ -3,9 +3,9 @@ module github.com/Azure/go-autorest/autorest
go 1.12
require (
github.com/Azure/go-autorest/autorest/adal v0.5.0
github.com/Azure/go-autorest/autorest/mocks v0.2.0
github.com/Azure/go-autorest/autorest/adal v0.8.0
github.com/Azure/go-autorest/autorest/mocks v0.3.0
github.com/Azure/go-autorest/logger v0.1.0
github.com/Azure/go-autorest/tracing v0.5.0
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
)

12
vendor/github.com/Azure/go-autorest/autorest/go.sum сгенерированный поставляемый
Просмотреть файл

@ -1,11 +1,18 @@
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
@ -14,5 +21,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

2
vendor/github.com/jim-minter/go-cosmosdb/pkg/gencosmosdb/bindata.go сгенерированный поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
vendor/golang.org/x/sys/unix/mkall.sh сгенерированный поставляемый
Просмотреть файл

@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
$cmd docker build --tag generate:$GOOS $GOOS
$cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
exit
fi

Просмотреть файл

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
// +build linux
// +build arm arm64
@ -39,3 +39,15 @@ func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
}
// PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
}
// PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
}

Просмотреть файл

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT.
// +build linux
// +build mips mips64

Просмотреть файл

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT.
// +build linux
// +build mipsle mips64le

Просмотреть файл

@ -1,4 +1,4 @@
// Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT.
// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT.
// +build linux
// +build 386 amd64

3
vendor/golang.org/x/tools/go/packages/doc.go сгенерированный поставляемый
Просмотреть файл

@ -60,8 +60,7 @@ causes Load to run in LoadFiles mode, collecting minimal information.
See the documentation for type Config for details.
As noted earlier, the Config.Mode controls the amount of detail
reported about the loaded packages, with each mode returning all the data of the
previous mode with some extra added. See the documentation for type LoadMode
reported about the loaded packages. See the documentation for type LoadMode
for details.
Most tools should pass their command-line arguments (after any flags)

7
vendor/golang.org/x/tools/internal/imports/imports.go сгенерированный поставляемый
Просмотреть файл

@ -83,8 +83,9 @@ func FixImports(filename string, src []byte, opt *Options) (fixes []*ImportFix,
return getFixes(fileSet, file, filename, opt.Env)
}
// ApplyFix will apply all of the fixes to the file and format it.
func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options) (formatted []byte, err error) {
// ApplyFixes applies all of the fixes to the file and formats it. extraMode
// is added in when parsing the file.
func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, extraMode parser.Mode) (formatted []byte, err error) {
src, opt, err = initialize(filename, src, opt)
if err != nil {
return nil, err
@ -100,6 +101,8 @@ func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options) (
if opt.AllErrors {
parserMode |= parser.AllErrors
}
parserMode |= extraMode
file, err := parser.ParseFile(fileSet, filename, src, parserMode)
if file == nil {
return nil, err